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>
272 long long current = 0;
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 long long creationTime(TimeType typ=milliSec, InfoType fetch=Times, long pid=-1)
Process Creation time.
ProcessTime(TimeValueType k, TimeValueType u, TimeValueType e)
Constructor.
template long long currentTime< Month >()
TimeValueType kernelTime() const
Retrieve the kernel time in the requested unit.
Note: OS specific details for environment resolution.
template long long currentTime< Year >()
TimeValueType userTime() const
Retrieve the user time in the requested unit.
ProcessTime operator-(const ProcessTime &rhs) const
Return the delta between two ProcessTime objects.
long long adjustTime< Native >(long long t)
ProcessTime()
Constructor.
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.
TimeValueType i_kernel
Internal storage.
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)
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.
template long long currentTime< nanoSec >()
ProcessTime & operator+=(const ProcessTime &rhs)
Add the timings to the current objects.
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.