TTimer


class description - source file - inheritance tree

class TTimer : public TSysEvtHandler


    public:
TTimer TTimer(TTimer&) TTimer TTimer(Long_t milliSec, Bool_t mode = kTRUE) virtual void ~TTimer() Bool_t CheckTimer(TTime& now) TClass* Class() TTime GetAbsTime() 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 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)


See also

TProcessEventTimer

Class Description

                                                                      
 TTimer                                                               
                                                                      
 Handles synchronous and a-synchronous timer events. To make use of   
 this class one has to sub-class TTimer and implement Notify() and    
 Remove() (if timer has not been added to the gSystem timer list).    
 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().

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 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


              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.00/12 05/10/98 19.18.59 by Fons Rademakers
Copyright (c) 1995-1998, 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.