13 #define GAUDIKERNEL_TIMING_CPP 23 # include <sys/time.h> 24 # include <sys/times.h> 29 static const long long UNIX_BASE_TIME = 116444736000000000;
31 static const long long UNIX_BASE_TIME = 0;
78 long long count = 10000;
80 count *= ::GetTickCount();
83 count *= 10 * times( &buf );
119 static long long sys_start = 0;
120 if ( 0 == sys_start ) {
123 sys_start = 10 * c - t;
136 long long created = 0;
170 long long kerneltime = 0;
179 long long usertime = 0;
187 long long cputime = 0;
GAUDI_API long long creationTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
Process Creation time.
Process/Thread System and User Time NtQueryInformationProcess using ProcessTimes NtQueryInformationTh...
template long long currentTime< Month >()
Note: OS specific details for environment resolution.
template long long currentTime< Year >()
long long adjustTime< Native >(long long t)
long long adjustTime< Month >(long long t)
template long long currentTime< Hour >()
GAUDI_API long long remainingTime(TimeType typ=milliSec, InfoType fetch=Quota, long pid=-1)
Maximum processing time left for this process.
long long adjustTime< nanoSec >(long long t)
GAUDI_API long long currentTime()
Retrieve absolute system time.
long long adjustTime< Day >(long long t)
TimeType
Time type for conversion.
GAUDI_API long long kernelTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
CPU kernel mode time of process in milliseconds.
GAUDI_API long long userTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
CPU user 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)
GAUDI_API long long ellapsedTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
Elapsed time since start of process in milliseconds.
GAUDI_API long long cpuTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
Consumed CPU time of process in milliseconds.
GAUDI_API long long tickCount()
Retrieve the number of ticks since system startup.
GAUDI_API long long upTime(TimeType typ=Hour)
Maximum processing time left for this process.
long long adjustTime< Min >(long long t)
template long long currentTime< Sec >()
template long long currentTime< Min >()
template long long currentTime< Native >()
template long long currentTime< milliSec >()
template long long currentTime< Day >()
GAUDI_API long long adjustTime(TimeType typ, long long timevalue)
Convert time from OS native time to requested representation (Experts only)
ProcessDescriptor * getProcess()
Retrieve Process structure.
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)
template long long currentTime< nanoSec >()
long long adjustTime< Sec >(long long t)
template long long currentTime< microSec >()
GAUDI_API long long systemStart(TimeType typ=Sec)
Maximum processing time left for this process.
InfoType
Enumeration for fetching information.