[commit: ghc] master: Add TODO about getMonotonicNSec() wrapping that can no longer happen. (9bf6310)
git at git.haskell.org
git at git.haskell.org
Wed Sep 27 21:38:40 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9bf6310d2002ef57dc726a4d9240bd520925114d/ghc
>---------------------------------------------------------------
commit 9bf6310d2002ef57dc726a4d9240bd520925114d
Author: Niklas Hambüchen <mail at nh2.me>
Date: Wed Sep 27 15:24:11 2017 -0400
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
>---------------------------------------------------------------
9bf6310d2002ef57dc726a4d9240bd520925114d
rts/win32/GetTime.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/rts/win32/GetTime.c b/rts/win32/GetTime.c
index 90c0d0d..014a676 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();
More information about the ghc-commits
mailing list