On Tue, Mar 06, 2012 at 07:47:06AM +0100, Otto Moerbeek wrote: > On Tue, Mar 06, 2012 at 01:01:57AM -0500, Woodchuck wrote: >
> BTW, your format strings are not right, both in size of operand and > signedness. Here: Oops. > > > printf("Resolution: %lu %lu\n", tp.tv_sec, tp.tv_nsec); > > > for (i = 0; i < 10; i++) { > > clock_gettime(CLOCK_REALTIME, &tp); > > And here: > > printf("Performance: %lu %lu\n", tp.tv_sec, tp.tv_nsec); > > } > > return 0; > > } > > > struct timespec { > time_t tv_sec; /* seconds */ > long tv_nsec; /* and nanoseconds */ > }; > > and time_t is int Thank you for the correction. Dave