5 * time - routines for dealing with time
7 * This code provides convenient functions for working with time.
9 * Author: Rusty Russell <rusty@rustcorp.com.au>
13 * #include <ccan/time/time.h>
18 * int main(int argc, char *argv[])
23 * errx(1, "Usage: %s <diff in millisec>", argv[0]);
26 * if (argv[1][0] == '-')
27 * t = time_sub(t, time_from_msec(atol(argv[1]+1)));
29 * t = time_add(t, time_from_msec(atol(argv[1])));
31 * printf("%lu.%06u\n",
32 * (unsigned long)t.tv_sec, (unsigned)t.tv_usec);
36 int main(int argc, char *argv[])
38 /* Expect exactly one argument */
42 if (strcmp(argv[1], "depends") == 0) {