41 uint64_t begin = 0, end = 0;
42 double t_begin = 0, t_end = 0;
47 gettimeofday( &b_tv , NULL );
54 gettimeofday( &e_tv , NULL );
56 t_begin = b_tv.tv_sec + b_tv.tv_usec*1e-6;
57 t_end = e_tv.tv_sec + e_tv.tv_usec*1e-6;
59 ret = (end-begin)/(t_end-t_begin);
uint64_t Process_time_origin
The origin of the timer.
void Timer_Init_scale(unsigned int(*real_usleep)(unsigned int))
Timer_Init_scale.
long long int Process_Sync_Offset
The offset of the timer.
double Process_timer_second
A second in the timer scale.
void Timer_set_origin()
Initializes the timer (save current processor timer counter)
void Timer_set_offset(long long int offset)
Sets the offset to apply to timer.