#ifndef ROOT_TTimer
#define ROOT_TTimer
#ifndef ROOT_TSysEvtHandler
#include "TSysEvtHandler.h"
#endif
#ifndef ROOT_TTime
#include "TTime.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif
class TTimer : public TSysEvtHandler {
protected:
TTime fTime;
TTime fAbsTime;
Bool_t fTimeout;
Bool_t fSync;
Bool_t fIntSyscalls;
UInt_t fTimeID;
TObject *fObject;
TString fCommand;
private:
TTimer(const TTimer&);
TTimer& operator=(const TTimer&);
public:
TTimer(Long_t milliSec = 0, Bool_t mode = kTRUE);
TTimer(TObject *obj, Long_t milliSec, Bool_t mode = kTRUE);
TTimer(const char *command, Long_t milliSec, Bool_t mode = kTRUE);
virtual ~TTimer() { Remove(); }
Bool_t CheckTimer(const TTime &now);
const char *GetCommand() const { return fCommand.Data(); }
TObject *GetObject() { return fObject; }
TTime GetTime() const { return fTime; }
UInt_t GetTimerID() { return fTimeID;}
TTime GetAbsTime() const { return fAbsTime; }
Bool_t HasTimedOut() const { return fTimeout; }
Bool_t IsSync() const { return fSync; }
Bool_t IsAsync() const { return !fSync; }
Bool_t IsInterruptingSyscalls() const { return fIntSyscalls; }
virtual Bool_t Notify();
void Add() { TurnOn(); }
void Remove() { TurnOff(); }
void Reset();
void SetCommand(const char *command);
void SetObject(TObject *object);
void SetInterruptSyscalls(Bool_t set = kTRUE);
void SetTime(Long_t milliSec) { fTime = milliSec; }
void SetTimerID(UInt_t id = 0) { fTimeID = id; }
virtual void Start(Long_t milliSec = -1, Bool_t singleShot = kFALSE);
virtual void Stop() { TurnOff(); }
virtual void TurnOn();
virtual void TurnOff();
virtual void Timeout() { Emit("Timeout()"); }
static void SingleShot(Int_t milliSec, const char *receiver_class,
void *receiver, const char *method);
ClassDef(TTimer,0)
};
#endif
Last change: Wed Jun 25 08:54:14 2008
Last generated: 2008-06-25 08:54
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.