summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorLuc St-Louis <luc.st-louis@ca.transport.bombardier.com>2002-04-17 10:22:25 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2002-04-17 21:33:56 +0000
commit50ee8e5ea1d62ca6b3ab566d75c1f4fbefdc976c (patch)
treeec32bcd4af276da19053c0d2d6e51a6c1e9982a8 /win32
parente95392e36d6284654a4a8965874724aa53b96ee5 (diff)
downloadperl-50ee8e5ea1d62ca6b3ab566d75c1f4fbefdc976c.tar.gz
Devel::DProf Real Elapsed Times
Message-ID: <85256B9E.0064EBE9.00@btg_hub01.bombardier.com> p4raw-id: //depot/perl@15985
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/win32/win32.c b/win32/win32.c
index a77ec885fb..325531e29f 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1503,22 +1503,21 @@ win32_times(struct tms *timebuf)
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 */