TTimer


class description - source file - inheritance tree

class TTimer : public TSysEvtHandler


    public:
TTimer TTimer(Long_t milliSec, Bool_t mode = kTRUE) TTimer TTimer(TObject* obj, Long_t milliSec, Bool_t mode = kTRUE) TTimer TTimer(char* command, Long_t milliSec, Bool_t mode = kTRUE) TTimer TTimer(TTimer&) virtual void ~TTimer() Bool_t CheckTimer(TTime& now) TClass* Class() TTime GetAbsTime() const char* GetCommand() TObject* GetObject() TTime GetTime() UInt_t GetTimerID() Bool_t HasTimedOut() virtual TClass* IsA() Bool_t IsAsync() Bool_t IsSync() virtual Bool_t Notify() virtual void Remove() void Reset() void SetCommand(char* command) void SetObject(TObject* object) void SetTime(Long_t milliSec) void SetTimerID(UInt_t id = 0) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) virtual void TurnOff() virtual void TurnOn()

Data Members

protected:
TTime fTime time out time in ms TTime fAbsTime absolute time out time in ms Bool_t fTimeout true if timer has timed out Bool_t fSync true if synchrounous timer UInt_t fTimeID the system ID of this timer (for WIN32) TObject* fObject object to be notified (if any) TString fCommand interpreter command to be executed


See also

TProcessEventTimer

Class Description

                                                                      
 TTimer                                                               
                                                                      
 Handles synchronous and a-synchronous timer events. To make use of   
 this class one can use one of the threee cases:                      
   -sub-class TTimer and implement Notify() and Remove() (if timer    
    has not been added to the gSystem timer list).                    
   -Give a pointer of an object to be notified.                       
   -Specify a command string to be executed by the interpreter        
 Without sub-classing one can use the HasTimedOut() method.           
 Use Reset() to reset the timer after expiration. To disable a timer  
 remove it using Remove() or destroy it.                              
                                                                      


TTimer(Long_t ms, Bool_t mode) : fTime(ms)
 Create timer that times out in ms milliseconds. If mode == kTRUE then
 the timer is synchronous else a-synchronous. The default is synchronous.
 Add a timer to the system eventloop by doing: gSystem->AddTimer().

TTimer(TObject *obj, Long_t ms, Bool_t mode) : fTime(ms)
 Create timer that times out in ms milliseconds. If mode == kTRUE then
 the timer is synchronous else a-synchronous. The default is synchronous.
 Add a timer to the system eventloop by doing: gSystem->AddTimer().
 obj->HandleTimer will be called by Notify

TTimer(const char *command, Long_t ms, Bool_t mode) : fTime(ms)
 Create timer that times out in ms milliseconds. If mode == kTRUE then
 the timer is synchronous else a-synchronous. The default is synchronous.
 Add a timer to the system eventloop by doing: gSystem->AddTimer().
 the interpreter will execute command from Notify

Bool_t CheckTimer(const TTime &now)
 Check if timer timed out.

Bool_t Notify()
 Notify when timer times out

void Reset()
 Reset the timer.

void SetCommand(const char *command)
 Set the interpreter command to be executed at time out

void SetObject(TObject *object)
 Set the object to be notified  at time out

void TurnOff()
 Remove timer from system timer list. This requires that a timer
 has been placed in the system timer list (using TurnOn()).
 If a TTimer subclass is placed on another list, override TurnOff() to
 remove the timer from the correct list.

void TurnOn()
 Add the timer to the system timer list. If a TTimer subclass has to be
 placed on another list, override TurnOn() to add the timer to the correct
 list.



Inline Functions


        const char* GetCommand()
           TObject* GetObject()
              TTime GetTime()
             UInt_t GetTimerID()
              TTime GetAbsTime()
             Bool_t HasTimedOut()
             Bool_t IsSync()
             Bool_t IsAsync()
               void Remove()
               void SetTime(Long_t milliSec)
               void SetTimerID(UInt_t id = 0)
            TClass* Class()
            TClass* IsA()
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
             TTimer TTimer(TTimer&)
               void ~TTimer()


Author: Fons Rademakers 28/11/96
Last update: 2.20/05 13/12/98 12.42.44 by Rene Brun
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


ROOT page - Class index - Top of the page

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.