mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-18 23:12:15 +08:00
* 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.
This commit is contained in:
parent
5a8a5efcfd
commit
472130e897
@ -1,3 +1,10 @@
|
||||
2006-02-10 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2006-02-10 Brian Ford <Brian.Ford@FlightSafety.com>
|
||||
|
||||
* times.cc (clock_getres): Use correct conversion from milliseconds to
|
||||
|
@ -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 -
|
||||
|
@ -61,7 +61,6 @@ set_myself (HANDLE h)
|
||||
/* here if execed */
|
||||
static pinfo NO_COPY myself_identity;
|
||||
myself_identity.init (cygwin_pid (myself->dwProcessId), PID_EXECED, NULL);
|
||||
myself->start_time = time (NULL); /* Register our starting time. */
|
||||
myself->exec_sendsig = NULL;
|
||||
myself->exec_dwProcessId = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user