2 * Win32 kernel functions
4 * Copyright 1995 Martin von Loewis
22 /**********************************************************************
23 * ContinueDebugEvent [KERNEL32.146]
25 BOOL32 WINAPI
ContinueDebugEvent(DWORD pid
,DWORD tid
,DWORD contstatus
) {
26 FIXME(win32
,"(0x%lx,%ld,%ld): stub\n",pid
,tid
,contstatus
);
30 /*********************************************************************
31 * Process_ClockTimeToFileTime
32 * (olorin@fandra.org, 20-Sep-1998)
33 * Converts clock_t into FILETIME.
34 * Used by GetProcessTime.
35 * Differences to UnixTimeToFileTime:
36 * 1) Divided by CLK_TCK
37 * 2) Time is relative. There is no 'starting date', so there is
38 * no need in offset correction, like in UnixTimeToFileTime
39 * FIXME: This function should be moved to a more appropriate .c file
40 * FIXME: On floating point operations, it is assumed that
41 * floating values are truncated on convertion to integer.
43 void Process_ClockTimeToFileTime( clock_t unix_time
, LPFILETIME filetime
)
45 double td
= (unix_time
*10000000.0)/CLK_TCK
;
46 /* Yes, double, because long int might overflow here. */
47 #if (SIZEOF_LONG_LONG >= 8)
48 unsigned long long t
= td
;
49 filetime
->dwLowDateTime
= (UINT32
) t
;
50 filetime
->dwHighDateTime
= (UINT32
) (t
>> 32);
52 double divider
= 1. * (1 << 16) * (1 << 16);
53 filetime
->dwHighDateTime
= (UINT32
) (td
/ divider
);
54 filetime
->dwLowDateTime
= (UINT32
) (td
- filetime
->dwHighDateTime
*divider
);
55 /* using floor() produces wierd results, better leave this as it is
56 * ( with (UINT32) convertion )
61 /*********************************************************************
62 * GetProcessTimes [KERNEL32.262]
64 * FIXME: lpCreationTime, lpExitTime are NOT INITIALIZED.
65 * olorin@fandra.org: Would be nice to substract the cpu time,
66 * used by Wine at startup.
67 * Also, there is a need to separate times
68 * used by different applications.
70 BOOL32 WINAPI
GetProcessTimes(
71 HANDLE32 hprocess
,LPFILETIME lpCreationTime
,LPFILETIME lpExitTime
,
72 LPFILETIME lpKernelTime
, LPFILETIME lpUserTime
77 Process_ClockTimeToFileTime(tms
.tms_utime
,lpUserTime
);
78 Process_ClockTimeToFileTime(tms
.tms_stime
,lpKernelTime
);