Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef ATHENAKERNEL_ALGORITHMTIMER_H
6 #define ATHENAKERNEL_ALGORITHMTIMER_H
17 #include "GaudiKernel/ServiceHandle.h"
23 #include <sys/signal.h>
33 typedef sigval sigval_t;
34 typedef itimerval timer_t;
42 namespace AlgorithmTimerHandler
127 void start(
unsigned int milliseconds);
AlgorithmTimerConfig
Configuration flags for AlgorithmTimer.
Helper class to create a "scoped cook timer" without having to declare the CookTimer itself within th...
unsigned int m_timeout
timeout in milliseconds
timer_t m_timerid
timer ID
AlgorithmTimer(const AlgorithmTimer &)
no copying allowed
unsigned int m_gdb_details
unsigned int timeLeft() const
Returns the time left in milliseconds.
@ USEREALTIME
use real time instead of system time
unsigned int stop()
Stop the timer and return the time left in [ms].
void onAlarmThread(sigval_t sv)
Function called by signals delivered via threads.
unsigned int timeout() const
Returns the currently set timeout (in milliseconds)
Some weak symbol referencing magic...
AlgorithmTimer * m_timer
AlgorithmTimer instance, set by AlgorithmTimer::start()
unsigned int m_timeout
Timeout in milliseconds.
AlgorithmTimer()
no default constructor
void start()
(Re)start the timer with the last timeout used
std::function< void()> callbackFct_t
AlgorithmTimer & operator=(const AlgorithmTimer &)
no copying allowed
std::atomic_bool m_active
flag protecting race condition at stop
ScopedTimer(unsigned int milliseconds)
void SetGDBCoreDumpDetails(unsigned int details)
set the levelof details for (optional) gdb core dump
callbackFct_t m_onAlarm
user callback
~AlgorithmTimer()
Destroy and disable the timer.
struct sigevent m_sigevent
for signal handler
Timer that invokes a user callback once the time is reached.