summaryrefslogtreecommitdiff
path: root/rts/win32
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2017-09-27 15:24:11 -0400
committerBen Gamari <ben@smart-cactus.org>2017-09-27 17:37:29 -0400
commit9bf6310d2002ef57dc726a4d9240bd520925114d (patch)
treec6a234a96f8c9bd94af895f1e638c15229df42a5 /rts/win32
parent1e9f90af7311c33de0f7f5b7dba594725596d675 (diff)
downloadhaskell-9bf6310d2002ef57dc726a4d9240bd520925114d.tar.gz
Add TODO about getMonotonicNSec() wrapping that can no longer happen.
Knowing this is important for followup commits, where we will subtract getProcessElapsedTime() values from each other, in a way that assumes that there is no wrapping every 49 days. Reviewers: bgamari, austin, erikd, simonmar, NicolasT Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14233 Differential Revision: https://phabricator.haskell.org/D3964
Diffstat (limited to 'rts/win32')
-rw-r--r--rts/win32/GetTime.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/win32/GetTime.c b/rts/win32/GetTime.c
index 90c0d0d244..014a676e99 100644
--- a/rts/win32/GetTime.c
+++ b/rts/win32/GetTime.c
@@ -84,6 +84,11 @@ getMonotonicNSec()
}
else // fallback to GetTickCount
{
+ // TODO: Remove this code path, it cannot be taken because
+ // `QueryPerformanceFrequency` cannot fail on Windows >= XP
+ // and GHC no longer supports Windows <= XP.
+ // See https://ghc.haskell.org/trac/ghc/ticket/14233
+
// NOTE: GetTickCount is a 32-bit millisecond value, so it wraps around
// every 49 days.
DWORD count = GetTickCount();