Skip to content

Instantly share code, notes, and snippets.

@nazarov-yuriy
Last active December 17, 2015 03:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nazarov-yuriy/5543112 to your computer and use it in GitHub Desktop.
Save nazarov-yuriy/5543112 to your computer and use it in GitHub Desktop.
#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);
}
#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