[lib] Add timestamp_is_null()

This commit is contained in:
Matteo Cypriani 2011-03-24 23:05:56 +01:00
parent 161157dae7
commit 7fa5819544
2 changed files with 8 additions and 0 deletions

View File

@ -137,6 +137,13 @@ owl_timestamp owl_timeval_to_timestamp(const struct timeval d)
owl_bool owl_timestamp_is_null(owl_timestamp d)
{
return d.tv_sec == 0 && d.tv_nsec == 0 ;
}
/*
* Converts a owl_timestamp date value into milliseconds.
*/

View File

@ -249,6 +249,7 @@ int owl_timestamp_now(owl_timestamp *now) ;
owl_timestamp owl_timespec_to_timestamp(const struct timespec d) ;
owl_timestamp owl_timeval_to_timestamp(const struct timeval d) ;
void owl_timestamp_to_string(char *dst, owl_timestamp src) ;
owl_bool owl_timestamp_is_null(owl_timestamp d) ;
uint64_t owl_timestamp_to_ms(owl_timestamp date) ;
uint_fast32_t owl_time_elapsed_ms(const owl_timestamp d1,
const owl_timestamp d2) ;