Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-02-11 07:53:14 +0300
committerChristopher Faylor <me@cgf.cx>2006-02-11 07:53:14 +0300
commit472130e8978290ef40e5f60058b1784c4149fc9e (patch)
treeb83702ad909a58384f4ee655aaf3cb3f239d7b04 /winsup/cygwin/fhandler_process.cc
parent5a8a5efcfdca8bd29d653c1aac1aece95e46c3f7 (diff)
* fhandler_process.cc (format_process_stat): Use cygwin-derived start time even
on NT since it is the logical start time of the "process". * pinfo.cc (set_myself): Don't set start time when it should have already been set previously.
Diffstat (limited to 'winsup/cygwin/fhandler_process.cc')
-rw-r--r--winsup/cygwin/fhandler_process.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc
index 28fd28c39..852e891e1 100644
--- a/winsup/cygwin/fhandler_process.cc
+++ b/winsup/cygwin/fhandler_process.cc
@@ -639,9 +639,8 @@ format_process_stat (_pinfo *p, char *destbuf, size_t maxsize)
state = 'T';
else if (wincap.is_winnt ())
state = get_process_state (p->dwProcessId);
- if (!wincap.is_winnt ())
- start_time = (GetTickCount () / 1000 - time (NULL) + p->start_time) * HZ;
- else
+ start_time = (GetTickCount () / 1000 - time (NULL) + p->start_time) * HZ;
+ if (wincap.is_winnt ())
{
NTSTATUS ret;
HANDLE hProcess;
@@ -700,7 +699,6 @@ format_process_stat (_pinfo *p, char *destbuf, size_t maxsize)
fault_count = vmc.PageFaultCount;
utime = put.UserTime.QuadPart * HZ / 10000000ULL;
stime = put.KernelTime.QuadPart * HZ / 10000000ULL;
- start_time = (put.CreateTime.QuadPart - stodi.BootTime.QuadPart) * HZ / 10000000ULL;
#if 0
if (stodi.CurrentTime.QuadPart > put.CreateTime.QuadPart)
start_time = (spt.KernelTime.QuadPart + spt.UserTime.QuadPart -