23#define GAUDIKERNEL_TIMING_CPP
34static const long long UNIX_BASE_TIME = 0;
77 long long count = 10000;
79 count *= 10 * times( &buf );
114 static long long sys_start = 0;
115 if ( 0 == sys_start ) {
118 sys_start = 10 * c - t;
131 long long created = 0;
157 if (
getProcess()->query( pid, fetch, &info ) ) {
166 long long kerneltime = 0;
175 long long usertime = 0;
183 long long cputime = 0;
Simple class to hold the time information of a process.
Note: OS specific details for environment resolution.
GAUDI_API ProcessTime getProcessTime(long pid=-1)
Retrieve the process time data for a process.
TimeType
Time type for conversion.
GAUDI_API long long systemStart(TimeType typ=Sec)
Maximum processing time left for this process.
GAUDI_API long long kernelTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
CPU kernel mode time of process in milliseconds.
InfoType
Enumeration for fetching information.
GAUDI_API long long creationTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
Process Creation time.
GAUDI_API long long adjustTime(TimeType typ, long long timevalue)
Convert time from OS native time to requested representation (Experts only)
GAUDI_API long long currentTime()
Retrieve absolute system time.
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 tickCount()
Retrieve the number of ticks since system startup.
GAUDI_API long long upTime(TimeType typ=Hour)
Maximum processing time left for this process.
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 remainingTime(TimeType typ=milliSec, InfoType fetch=Quota, long pid=-1)
Maximum processing time left for this process.
GAUDI_API long long userTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
CPU user mode time of process in milliseconds.
ProcessDescriptor * getProcess()
Retrieve Process structure.
Process/Thread System and User Time NtQueryInformationProcess using ProcessTimes NtQueryInformationTh...
Process Quotas NtQueryInformationProcess using ProcessQuotaLimits NtQueryInformationProcess using Pro...