From: Simon Tatham Date: Tue, 15 May 2012 22:19:21 +0000 (+0000) Subject: Fix bug in the new CLOCK_MONOTONIC implementation. I was treating the X-Git-Tag: 0.63~199 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=29184e3702f7b9131d78f4732e4deae5d1c918bc;p=PuTTY.git Fix bug in the new CLOCK_MONOTONIC implementation. I was treating the nanoseconds field as a microseconds field, with hilarious consequences. [originally from svn r9535] --- diff --git a/unix/uxmisc.c b/unix/uxmisc.c index 01e1299d..300fc543 100644 --- a/unix/uxmisc.c +++ b/unix/uxmisc.c @@ -29,7 +29,7 @@ unsigned long getticks(void) struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) return ts.tv_sec * TICKSPERSEC + - ts.tv_nsec / (1000000 / TICKSPERSEC); + ts.tv_nsec / (1000000000 / TICKSPERSEC); } #endif {