From 899be6a1f17e4f1bd1e7fee6375432767757cc0b Mon Sep 17 00:00:00 2001 From: Krishna Vedala Date: Tue, 26 May 2020 09:35:25 -0400 Subject: [PATCH] removed in-favor of chronos library of c++11 --- others/measure_time_elapsed.cpp | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 others/measure_time_elapsed.cpp diff --git a/others/measure_time_elapsed.cpp b/others/measure_time_elapsed.cpp deleted file mode 100644 index d0830ab79..000000000 --- a/others/measure_time_elapsed.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// To calculate the time taken by a code to execute -#include -#include - -__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; -}