removed in-favor of chronos library of c++11

This commit is contained in:
Krishna Vedala 2020-05-26 09:35:25 -04:00
parent 4b25222d43
commit 899be6a1f1
No known key found for this signature in database
GPG Key ID: BA19ACF8FC8792F7

View File

@ -1,19 +0,0 @@
// To calculate the time taken by a code to execute
#include <sys/time.h>
#include <iostream>
__int64_t getTimeInMicroseconds() {
struct timeval start;
gettimeofday(&start, NULL);
return start.tv_sec * 1000000 + start.tv_usec;
}
// write function sample(args)
int main() {
// write code
__int64_t starttime = getTimeInMicroseconds();
// sample(args) function run
// Any other functions (if present) run
std::cout << getTimeInMicroseconds() - starttime;
}