12 #ifndef GAUDIKERNEL_TIMING_H 13 #define GAUDIKERNEL_TIMING_H 65 inline long long adjustTime(
long long timevalue );
128 template <TimeType T>
159 template <TimeType T>
166 template <TimeType T>
169 return adjustTime<T>(
i_user );
173 template <TimeType T>
180 template <TimeType T>
219 return ( t == -1 ) ? t : t /= ( 1LL * 365 * 24 * 60 * 60 * 1000 * 1000 * 10 );
224 return ( t == -1 ) ? t : t /= ( 1LL * 24 * 60 * 60 * 1000 * 1000 * 10 );
229 return ( t == -1 ) ? t : t /= ( 1LL * 60 * 60 * 1000 * 1000 * 10 );
234 return ( t == -1 ) ? t : t /= ( 60 * 1000 * 1000 * 10 );
239 return ( t == -1 ) ? t : t /= ( 1000 * 1000 * 10 );
244 return ( t == -1 ) ? t : t /= ( 1000 * 10 );
249 return ( t == -1 ) ? t : t /= ( 10LL );
254 return ( t == -1 ) ? t : t *= 100LL;
259 return ( t == -1 ) ? t : t /= ( 1LL * 30 * 24 * 60 * 60 * 1000 * 1000 * 10 );
268 template <TimeType T>
273 ::GetSystemTimeAsFileTime( (FILETIME*)¤t );
274 return adjustTime<T>( current - UNIX_BASE_TIME );
277 ::gettimeofday( &tv, 0 );
278 return adjustTime<T>( ( tv.tv_sec * 1000000 + tv.tv_usec ) * 10 );
295 #endif // GAUDIKERNEL_TIMING_H 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 >()
ProcessTime(TimeValueType k, TimeValueType u, TimeValueType e)
Constructor.
template longlong currentTime< Min >()
GAUDI_API longlong systemStart(TimeType typ=Sec)
Maximum processing time left for this process.
template longlong currentTime< Month >()
TimeValueType kernelTime() const
Retrieve the kernel time in the requested unit.
Note: OS specific details for environment resolution.
TimeValueType userTime() const
Retrieve the user time in the requested unit.
ProcessTime operator-(const ProcessTime &rhs) const
Return the delta between two ProcessTime objects.
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)
ProcessTime()
Constructor.
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.
TimeValueType i_kernel
Internal storage.
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.
template longlong currentTime< Hour >()
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< Day >()
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)
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 currentTime()
Retrieve absolute system time.
long long adjustTime< Min >(long long t)
template longlong currentTime< Sec >()
GAUDI_API longlong adjustTime(TimeType typ, longlong timevalue)
Convert time from OS native time to requested representation (Experts only)
TimeValueType elapsedTime() const
Retrieve the elapsed time in the requested unit.
GAUDI_API ProcessTime getProcessTime(long pid=-1)
Retrieve the process time data for a process.
long long adjustTime< Hour >(long long t)
TimeValueType cpuTime() const
Retrieve the CPU (user+kernel) time in the requested unit.
ProcessTime & operator+=(const ProcessTime &rhs)
Add the timings to the current objects.
long long adjustTime< Sec >(long long t)
template longlong currentTime< Year >()
InfoType
Enumeration for fetching information.