14 #define GAUDIKERNEL_TIMING_CPP
25 #include <sys/times.h>
30 static const longlong UNIX_BASE_TIME = 116444736000000000;
32 static const longlong UNIX_BASE_TIME = 0;
69 count *= ::GetTickCount();
72 count *= 10*times(&buf);
83 ::GetSystemTimeAsFileTime((FILETIME*)¤t);
84 current -= UNIX_BASE_TIME;
88 ::gettimeofday(&tv, &tz);
91 current += tv.tv_usec;
100 if ( 0 == sys_start ) {
103 sys_start = 10*c - t;
ProcessDescriptor * getProcess()
Retrieve Process structure.
Process/Thread System and User Time NtQueryInformationProcess using ProcessTimes NtQueryInformationTh...
GAUDI_API longlong userTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
CPU user mode time of process in milliseconds.
GAUDI_API longlong systemStart(TimeType typ=Sec)
Maximum processing time left for this process.
GAUDI_API longlong cpuTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
Consumed CPU time of process in milliseconds.
long long adjustTime< Native >(long long t)
long long adjustTime< Month >(long long t)
GAUDI_API longlong ellapsedTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
Elapsed time since start of process in milliseconds.
GAUDI_API longlong upTime(TimeType typ=Hour)
Maximum processing time left for this process.
long long adjustTime< nanoSec >(long long t)
GAUDI_API longlong tickCount()
Retrieve the number of ticks since system startup.
long long adjustTime< Day >(long long t)
GAUDI_API longlong creationTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
Process Creation time.
TimeType
Time type for conversion.
GAUDI_API longlong remainingTime(TimeType typ=milliSec, InfoType fetch=Quota, long pid=-1)
Maximum processing time left for this process.
GAUDI_API longlong kernelTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
CPU kernel mode time of process in milliseconds.
long long adjustTime< milliSec >(long long t)
long long adjustTime< Year >(long long t)
Simple class to hold the time information of a process.
long long adjustTime< microSec >(long long t)
long long adjustTime< Min >(long long t)
GAUDI_API longlong adjustTime(TimeType typ, longlong timevalue)
Convert time from OS native time to requested representation (Experts only)
Process Quotas NtQueryInformationProcess using ProcessQuotaLimits NtQueryInformationProcess using Pro...
long query(long pid, InfoType info, PROCESS_BASIC_INFORMATION *buffer)
GAUDI_API ProcessTime getProcessTime(long pid=-1)
Retrieve the process time data for a process.
long long adjustTime< Hour >(long long t)
long long adjustTime< Sec >(long long t)
InfoType
Enumeration for fetching information.
GAUDI_API longlong currentTime(TimeType typ=milliSec)
Retrieve absolute system time.