From: simon 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-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/39439af6f686d26bc94f8b8c1c7a1965564b4a47?hp=92fb929a296f08ae5907940baaee7a02db14dc8f Fix bug in the new CLOCK_MONOTONIC implementation. I was treating the nanoseconds field as a microseconds field, with hilarious consequences. git-svn-id: svn://svn.tartarus.org/sgt/putty@9535 cda61777-01e9-0310-a592-d414129be87e --- 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 {