summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorJan Dubois <jand@activestate.com>1999-04-03 21:04:18 +0200
committerGurusamy Sarathy <gsar@cpan.org>1999-05-07 03:28:53 +0000
commitfdb068fae82a164ca46639e6b096f05aeb3dc5ea (patch)
tree20ab48db492de55cb7c8d14b9ceb2b425db5a2bc /win32
parent3eb568f1c9e22faaefbd6531878f947fab30705b (diff)
downloadperl-fdb068fae82a164ca46639e6b096f05aeb3dc5ea.tar.gz
avoid negative return value from Win32::GetTickCount()
Message-ID: <37084742.22824479@smtp1.ibm.net> Subject: Re: Win32::GetTickCount p4raw-id: //depot/perl@3316
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index df28419105..1848e9ba27 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -2764,7 +2764,10 @@ XS(w32_GetTickCount)
{
dXSARGS;
EXTEND(SP,1);
- XSRETURN_IV(GetTickCount());
+ DWORD msec = GetTickCount();
+ if ((IV)msec > 0)
+ XSRETURN_IV(msec);
+ XSRETURN_NV(msec);
}
static