X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftime%2Ftime.h;h=5bb1ad5b5cfaafc103cd780fb485fe406e40c820;hb=737dcc0fe959d67eb29f57df37b0d7f188e0213d;hp=a9936b50bdd9a68399f4ae09acfad5d931f0580a;hpb=8b09a6d9f6b27ebb2d0719388d1cf7067083fe2d;p=ccan diff --git a/ccan/time/time.h b/ccan/time/time.h index a9936b50..5bb1ad5b 100644 --- a/ccan/time/time.h +++ b/ccan/time/time.h @@ -334,6 +334,7 @@ static inline struct timespec time_from_nsec(uint64_t nsec) * struct timeval tv; * * tv = timespec_to_timeval(time_now()); + * printf("time = %lu.%06u\n", (long)tv.tv_sec, (int)tv.tv_usec); */ static inline struct timeval timespec_to_timeval(struct timespec ts) { @@ -352,6 +353,7 @@ static inline struct timeval timespec_to_timeval(struct timespec ts) * struct timespec ts; * * ts = timeval_to_timespec(tv); + * printf("timespec = %lu.%09lu\n", (long)ts.tv_sec, (long)ts.tv_nsec); */ static inline struct timespec timeval_to_timespec(struct timeval tv) {