Add timer_cmp() utility function to compare two timevals.
This is preferable to using time_diff() to compare two timevals, because time_diff() gives its result as a 'double' which only has 53 bits of precision. Also switch a couple of places from using time_diff() to using this function.
This commit is contained in:
@@ -82,6 +82,7 @@ struct timeval BX_get_time (struct timeval *);
|
||||
double BX_time_diff (struct timeval, struct timeval);
|
||||
double time_since(const struct timeval *tv_from);
|
||||
double time_until(const struct timeval *tv_to);
|
||||
int time_cmp(const struct timeval *a, const struct timeval *b);
|
||||
char * BX_plural (int);
|
||||
int BX_time_to_next_minute (void);
|
||||
char * BX_remove_trailing_spaces (char *);
|
||||
|
||||
Reference in New Issue
Block a user