aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-03-03 16:43:20 +0100
committerPierre Ossman <ossman@cendio.se>2015-03-03 16:43:20 +0100
commitf10d2a7cb0bd28743971dc5edc3e3fff298fa264 (patch)
treeb12dacfca14e885b34875365b8b2210bb2249e87
parent7d218b08a3da0a6d2bc277b642788f1d9c9fcaad (diff)
downloadtigervnc-f10d2a7cb0bd28743971dc5edc3e3fff298fa264.tar.gz
tigervnc-f10d2a7cb0bd28743971dc5edc3e3fff298fa264.zip
Wrong array index in CPU usage calculation on Windows
-rw-r--r--tests/util.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/util.cxx b/tests/util.cxx
index 52a2c610..419f09ca 100644
--- a/tests/util.cxx
+++ b/tests/util.cxx
@@ -107,7 +107,7 @@ double getCpuCounter(cpucounter_t c)
counters[1] = (uint64_t)s[1].dwHighDateTime << 32 |
s[1].dwLowDateTime;
- seconds = (double)(counters[1] - counters[2]) / 10000000.0;
+ seconds = (double)(counters[1] - counters[0]) / 10000000.0;
#else
seconds = (double)(s[1].ru_utime.tv_sec -
s[0].ru_utime.tv_sec);