Hello,
i have the code below:
i would like to ask the differ is in microseconds or milliseconds ?Code:#include <sys/time.h> #include <iostream> using namespace std; int main(void){ struct timeval start, end; long differ; gettimeofday(&start, NULL); //start time. do_some_work(); differ = end.tv_usec - start.tv_usec; //elapsed time. cout << "\n\nelapsed time is " << differ; return 0; }
Thanks.


Reply With Quote
Victor Nijegorodov

Bookmarks