mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-27 02:02:26 +00:00
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]
This commit is contained in:
parent
0395e52bb8
commit
29184e3702
@ -29,7 +29,7 @@ unsigned long getticks(void)
|
|||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
|
if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
|
||||||
return ts.tv_sec * TICKSPERSEC +
|
return ts.tv_sec * TICKSPERSEC +
|
||||||
ts.tv_nsec / (1000000 / TICKSPERSEC);
|
ts.tv_nsec / (1000000000 / TICKSPERSEC);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user