Change 15985 by jhi@alpha on 2002/04/17 21:33:56
Subject: [PATCH 5.7.3 Win32] Devel::DProf Real Elapsed Times
From: [EMAIL PROTECTED]
Date: Wed, 17 Apr 2002 14:22:25 -0400
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
.... //depot/perl/win32/win32.c#195 edit
Differences ...
==== //depot/perl/win32/win32.c#195 (text) ====
Index: perl/win32/win32.c
--- perl/win32/win32.c.~1~ Wed Apr 17 15:45:05 2002
+++ perl/win32/win32.c Wed Apr 17 15:45:05 2002
@@ -1503,22 +1503,21 @@
FILETIME user;
FILETIME kernel;
FILETIME dummy;
+ clock_t process_time_so_far = clock();
if (GetProcessTimes(GetCurrentProcess(), &dummy, &dummy,
&kernel,&user)) {
timebuf->tms_utime = filetime_to_clock(&user);
timebuf->tms_stime = filetime_to_clock(&kernel);
timebuf->tms_cutime = 0;
timebuf->tms_cstime = 0;
-
} else {
/* That failed - e.g. Win95 fallback to clock() */
- clock_t t = clock();
- timebuf->tms_utime = t;
+ timebuf->tms_utime = process_time_so_far;
timebuf->tms_stime = 0;
timebuf->tms_cutime = 0;
timebuf->tms_cstime = 0;
}
- return 0;
+ return process_time_so_far;
}
/* fix utime() so it works on directories in NT */
End of Patch.