223 Connect(
this,
"Timeout()",
"TTimer",
this,
"TurnOff()");
225 Disconnect(
this,
"Timeout()",
this,
"TurnOff()");
237 if (
gSystem->RemoveTimer(
this))
249 Disconnect(
this,
"Timeout()",
this,
"TurnOff()");
262 void *receiver,
const char *method)
266 receiver_class, receiver, method);
273 "TTimer", &singleShotCleaner,
"TurnOn()");
285 return gSystem->GetListOfTimers()->IndexOf(
this) != -1;
int Int_t
Signed integer 4 bytes (int).
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
bool Bool_t
Boolean (0=false, 1=true) (bool).
TObject()
TObject constructor.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Bool_t Disconnect(const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
Disconnects signal of this object from slot of receiver.
void TurnOn() override
Add the timer to the system timer list.
~TSingleShotCleaner() override
Bool_t Notify() override
This method must be overridden to handle object notification (the base implementation is no-op).
Basic time type with millisecond precision.
virtual void TurnOff()
Remove timer from system timer list.
virtual void Start(Long_t milliSec=-1, Bool_t singleShot=kFALSE)
Starts the timer with a milliSec timeout.
virtual void TurnOn()
Add the timer to the system timer list.
void SetCommand(const char *command)
Set the interpreter command to be executed at time out.
void SetInterruptSyscalls(Bool_t set=kTRUE)
When the argument is true the a-synchronous timer (SIGALRM) signal handler is set so that interrupted...
void Reset()
Reset the timer.
Bool_t CheckTimer(const TTime &now)
Check if timer timed out.
void SetObject(TObject *object)
Set the object to be notified at time out.
static void SingleShot(Int_t milliSec, const char *receiver_class, void *receiver, const char *method)
This static function calls a slot after a given time interval.
void SetTime(Long_t milliSec)
TTimer(const TTimer &)=delete
Bool_t Notify() override
Notify when timer times out.
Bool_t IsRunning()
This function checks if the timer is running within gSystem (Has been started and did not finish yet)...