Last active
December 17, 2015 03:28
-
-
Save nazarov-yuriy/5543112 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/time.h> | |
#include "time_measurement.h" | |
unsigned long get_current_time_in_us(){ | |
struct timeval tv; | |
gettimeofday(&tv, 0); | |
return (tv.tv_sec*1000000l+tv.tv_usec); | |
} |
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
#ifndef TIME_MEASUREMENT_H_ | |
#define TIME_MEASUREMENT_H_ | |
unsigned long get_current_time_in_us(); | |
#endif /* TIME_MEASUREMENT_H_ */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment