time_support: improve use of types

Update timeval_add_time to use long int; implement timeval_add with it.
Update timeval_ms to check gettimeofday return value, return int64_t.
This commit is contained in:
Zachary T Welch
2009-11-09 05:45:57 -08:00
parent b7b4efcdf1
commit 0cd414c7d6
2 changed files with 15 additions and 26 deletions

View File

@@ -39,10 +39,10 @@
int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y);
int timeval_add(struct timeval *result, struct timeval *x, struct timeval *y);
int timeval_add_time(struct timeval *result, int sec, int usec);
int timeval_add_time(struct timeval *result, long sec, long usec);
/// @returns gettimeofday() timeval as 64-bit in ms
long long timeval_ms(void);
int64_t timeval_ms(void);
struct duration
{