13 #define GAUDIKERNEL_TIMING_CPP
15 #include "GaudiKernel/Timing.h"
24 #include <sys/times.h>
29 static const longlong UNIX_BASE_TIME = 116444736000000000;
31 static const longlong UNIX_BASE_TIME = 0;
68 count *= ::GetTickCount();
71 count *= 10*times(&buf);
82 ::GetSystemTimeAsFileTime((FILETIME*)¤t);
83 current -= UNIX_BASE_TIME;
87 ::gettimeofday(&tv, &tz);
90 current += tv.tv_usec;
99 if ( 0 == sys_start ) {
102 sys_start = 10*c - t;
ProcessDescriptor * getProcess()
Retrieve Process structure.
GAUDI_API ProcessTime getProcessTime(long pid=-1)
Retrieve the process time data for a process.
Process/Thread System and User Time NtQueryInformationProcess using ProcessTimes NtQueryInformationTh...
Note: OS specific details for environment resolution.
GAUDI_API longlong remainingTime(TimeType typ=milliSec, InfoType fetch=Quota, long pid=-1)
Maximum processing time left for this process.
long long adjustTime< Native >(long long t)
long long adjustTime< Month >(long long t)
long long adjustTime< nanoSec >(long long t)
GAUDI_API longlong currentTime(TimeType typ=milliSec)
Retrieve absolute system time.
long long adjustTime< Day >(long long t)
GAUDI_API longlong systemStart(TimeType typ=Sec)
Maximum processing time left for this process.
TimeType
Time type for conversion.
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 longlong ellapsedTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
Elapsed time since start of process in milliseconds.
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)
long long adjustTime< Hour >(long long t)
GAUDI_API longlong creationTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
Process Creation time.
GAUDI_API longlong kernelTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
CPU kernel mode time of process in milliseconds.
long long adjustTime< Sec >(long long t)
GAUDI_API longlong upTime(TimeType typ=Hour)
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.
InfoType
Enumeration for fetching information.
GAUDI_API longlong tickCount()
Retrieve the number of ticks since system startup.
GAUDI_API longlong userTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
CPU user mode time of process in milliseconds.