diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-14 13:30:35 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-14 13:30:35 -0800 |
| commit | 2eace190e7715e6c48f33897acf7537576f7a412 (patch) | |
| tree | b8c778ba1216dbda9d7b0eef42e3f6bc5ce4441a /tests/platform.c | |
| parent | f4ce5a285167e7656037096f77f04ab80a010453 (diff) | |
| download | nng-2eace190e7715e6c48f33897acf7537576f7a412.tar.gz nng-2eace190e7715e6c48f33897acf7537576f7a412.tar.bz2 nng-2eace190e7715e6c48f33897acf7537576f7a412.zip | |
Use Windows tick clock instead of Performance counters.
Since we use the tick counter to sleep, we should use the same clock
for validation. The problem is that the high performance tick counter
on the CPU may be slightly out of agreement with the windows clock.
Furthermore, the tick counter is probably lots faster to retrieve since
it is already updated, and needn't be recalculated each time.
(We should consider just switching to millisecond clock resolution
internally as well. It turns out that I don't think that timers that
are shorter than 1ms are very useful.)
Diffstat (limited to 'tests/platform.c')
| -rw-r--r-- | tests/platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/platform.c b/tests/platform.c index 7bf1d0d1..0ac881d6 100644 --- a/tests/platform.c +++ b/tests/platform.c @@ -19,7 +19,7 @@ uint64_t getms(void) { #ifdef _WIN32 - return (GetTickCount()) ; + return (GetTickCount64()) ; #else static time_t epoch; struct timeval tv; |
