How do I get a microseconds timestamp in C?
I\'m trying to do:
struct timeval tv; gettimeofday(&tv,NULL); return tv.tv_usec;
Bu
use an unsigned long long (i.e. a 64 bit unit) to represent the system time:
typedef unsigned long long u64; u64 u64useconds; struct timeval tv; gettimeofday(&tv,NULL); u64useconds = (1000000*tv.tv_sec) + tv.tv_usec;