Date: Thu, 02 Jan 2003 03:35:21 -0800 From: Lev Walkin <vlm@netli.com> To: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> Cc: FreeBSD-hackers@FreeBSD.org, Garrett Wollman <wollman@lcs.mit.edu> Subject: Re: Timing with clock_gettime(2) (sysutils/clockspeed port) Message-ID: <3E1423F9.6070007@netli.com> References: <20021223110426.2848.qmail@exxodus.fedaykin.here>
next in thread | previous in thread | raw e-mail | index | archive | help
Mario Sergio Fujikawa Ferreira wrote: > #define timing_diffi(x,y) \ > ( \ > (double) ( ((x)->t.tv_sec - (y)->t.tv_sec) + \ > (double) ( \ > ((x)->t.tv_nsec - (double) (y)->t.tv_nsec) * 4294967296.0 / 1e9 \ > ) \ > ) \ > ) [skip] > printf("Avg getpid() time = %lld nsec\n", timing_diffi(&end,&start)/iters); Please, please read `man 3 printf`. Consider using %f instead of %lld. -- Lev Walkin vlm@netli.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E1423F9.6070007>