diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-09-22 20:33:22 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-09-23 00:15:31 +0200 |
commit | 66f8070dd3a6a5c51c8e6d37deb7c52a9a717e1b (patch) | |
tree | a4201a369a93fe191a90a6a7d1e68b7585e8a072 /lib/util/time.h | |
parent | 1bb6e6758cffea967b6b8299553653cf4192f2e9 (diff) | |
download | samba-66f8070dd3a6a5c51c8e6d37deb7c52a9a717e1b.tar.gz |
lib/util: move some timespec helpers from source3 to the toplevel
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Sep 23 00:15:31 CEST 2011 on sn-devel-104
Diffstat (limited to 'lib/util/time.h')
-rw-r--r-- | lib/util/time.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/util/time.h b/lib/util/time.h index 204c261c1d2..047daecdbff 100644 --- a/lib/util/time.h +++ b/lib/util/time.h @@ -300,4 +300,14 @@ struct timespec convert_time_t_to_timespec(time_t t); bool null_timespec(struct timespec ts); +struct timespec convert_timeval_to_timespec(const struct timeval tv); +struct timeval convert_timespec_to_timeval(const struct timespec ts); +struct timespec timespec_current(void); +struct timespec timespec_min(const struct timespec *ts1, + const struct timespec *ts2); +int timespec_compare(const struct timespec *ts1, const struct timespec *ts2); +void round_timespec_to_sec(struct timespec *ts); +void round_timespec_to_usec(struct timespec *ts); +void unix_timespec_to_nt_time(NTTIME *nt, struct timespec ts); + #endif /* _SAMBA_TIME_H_ */ |