X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftime%2F_info;h=9d1301c7385f9e375d241c13009fdee5d2281d5e;hb=79710d896e0f5d05b56caf9973de3c630a426c7a;hp=fdad27561a12f520ae5d3d4d92d4680d2fa9e89d;hpb=18631151c81a92341d26cee6f3b125191f3d5c41;p=ccan diff --git a/ccan/time/_info b/ccan/time/_info index fdad2756..9d1301c7 100644 --- a/ccan/time/_info +++ b/ccan/time/_info @@ -4,7 +4,8 @@ /** * time - routines for dealing with time * - * This code provides convenient functions for working with time. + * This code provides convenient functions for working with time, in the + * form of 'struct timespec'. * * Author: Rusty Russell * License: BSD-MIT @@ -17,7 +18,7 @@ * * int main(int argc, char *argv[]) * { - * struct timeval t; + * struct timespec t; * * if (argc != 2) * errx(1, "Usage: %s ", argv[0]); @@ -28,8 +29,8 @@ * else * t = time_add(t, time_from_msec(atol(argv[1]))); * - * printf("%lu.%06u\n", - * (unsigned long)t.tv_sec, (unsigned)t.tv_usec); + * printf("%lu.%09u\n", + * (unsigned long)t.tv_sec, (unsigned)t.tv_nsec); * return 0; * } */ @@ -43,5 +44,12 @@ int main(int argc, char *argv[]) return 0; } +#if HAVE_CLOCK_GETTIME_IN_LIBRT + if (strcmp(argv[1], "libs") == 0) { + printf("rt\n"); + return 0; + } +#endif + return 1; }