Created
March 22, 2017 22:41
-
-
Save VictorSouzas/e6415093a5bf1f167b132140df2e685f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/times.h> | |
struct timeval tv1, tv2; | |
#define TIMER_CLEAR (tv1.tv_sec = tv1.tv_usec = tv2.tv_sec = tv2.tv_usec=0) | |
#define TIMER_START gettimeofday(&tv1, (struct timezone*)0) | |
#define TIMER_STOP gettimeofday(&tv2, (struct timezone*)0) | |
#define TIMER_ELAPSED (tv2.tv_sec-tv1.tv_sec+(tv2.tv_usec-tv1.tv_usec)*1.E-6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/times.h> | |
struct timeval tv1, tv2; | |
#define TIMER_CLEAR (tv1.tv_sec = tv1.tv_usec = tv2.tv_sec = tv2.tv_usec=0) | |
#define TIMER_START gettimeofday(&tv1, (struct timezone*)0) | |
#define TIMER_STOP gettimeofday(&tv2, (struct timezone*)0) | |
#define TIMER_ELAPSED (tv2.tv_sec-tv1.tv_sec+(tv2.tv_usec-tv1.tv_usec)*1.E-6) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment