From: Jan Dubois Date: Sat, 3 Apr 1999 19:04:18 +0000 (+0200) Subject: avoid negative return value from Win32::GetTickCount() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fdb068fae82a164ca46639e6b096f05aeb3dc5ea;p=p5sagit%2Fp5-mst-13.2.git avoid negative return value from Win32::GetTickCount() Message-ID: <37084742.22824479@smtp1.ibm.net> Subject: Re: Win32::GetTickCount p4raw-id: //depot/perl@3316 --- diff --git a/win32/win32.c b/win32/win32.c index df28419..1848e9b 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