13 #define GAUDIKERNEL_TIMING_CPP 24 #include <sys/times.h> 29 static const longlong UNIX_BASE_TIME = 116444736000000000;
31 static const longlong UNIX_BASE_TIME = 0;
49 case Year :
return adjustTime<Year >(t);
50 case Month :
return adjustTime<Month >(t);
51 case Day :
return adjustTime<Day >(t);
52 case Hour :
return adjustTime<Hour >(t);
53 case Min :
return adjustTime<Min >(t);
54 case Sec :
return adjustTime<Sec >(t);
68 count *= ::GetTickCount();
71 count *= 10*times(&buf);
81 case Year :
return currentTime<Year >();
82 case Month :
return currentTime<Month >();
83 case Day :
return currentTime<Day >();
84 case Hour :
return currentTime<Hour >();
85 case Min :
return currentTime<Min >();
86 case Sec :
return currentTime<Sec >();
98 if ( 0 == sys_start ) {
101 sys_start = 10*c - t;
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.
template longlong currentTime< milliSec >()
template longlong currentTime< microSec >()
GAUDI_API longlong systemStart(TimeType typ=Sec)
Maximum processing time left for this process.
Note: OS specific details for environment resolution.
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)
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.
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.
template longlong currentTime< Native >()
template longlong currentTime< nanoSec >()
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)
Simple class to hold the time information of a process.
long long adjustTime< microSec >(long long t)
GAUDI_API longlong currentTime()
Retrieve absolute system time.
GAUDI_API longlong adjustTime(TimeType typ, longlong 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.
InfoType
Enumeration for fetching information.