User Documentation
Centre for Vision, Speech & Signal Processing
DEVELOP IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
DeadLineTimerC::DeadLineTimerC(BooleanT)
DeadLineTimerC::~DeadLineTimerC(void)
DeadLineTimerC::DeadLineTimerC(const DateC &,BooleanT)
DeadLineTimerC::DeadLineTimerC(RealT,BooleanT)
DeadLineTimerC::Stop(void)
DeadLineTimerC::Reset(RealT)
DeadLineTimerC::Reset(const DateC &)
DeadLineTimerC::IsTimeUp(void) const
DeadLineTimerC::IsRunning(void) const
DeadLineTimerC::IsVirtual(void) const
DeadLineTimerC::Remaining(void) const
DeadLineTimerC::WaitForIt(void) const
DeadLineTimerC
 
Dead line timer.
 
include "amma/DeadLine.hh"
User Level:Default
Library:Msys
Example:exDeadLine.cc
Section:Utilities.Timing
In Scope:std

Comments:
When the timer is started the timesUp flag is set to false, when the time expires the flag is set to TRUE. Note the timer flag is always TRUE if the timer is not running.

You should not expect a resolution in time better than 1ms. The actual resolution depends on the system the code is run on and may be worse than this. This is a SMALL object.

Variables:
Methods:
DeadLineTimerC(BooleanT useVirt = FALSE)

~DeadLineTimerC()
Destructor.

DeadLineTimerC(const DateC & timetoGo,BooleanT useVirt = FALSE)
Constructor for an absolute time.

DeadLineTimerC(RealT timetoGo,BooleanT useVirt = FALSE)
Constructor for a relative (to now) time.
Dead line will expire in 'timetoGo' seonds.

void Stop()
Stop timer.
This will set the timesUp flag, and free the deadline timer.

BooleanT Reset(RealT time)
Reset timer with 'time' left before deadline.
Will return false if deadline setup failed, or if the time as expired before the setup is completed. Any time smaller than zero is treated as infinite. NB. There is currently a maximum number of 64 deadline timers that can be active at any time.

This isn't a trivial routine, it involves several system calles, and alot of mucking about. Avoid calling it excessively.


BooleanT Reset(const DateC & time)
Set the deadline for 'time'
Will return false if deadline setup failed, or if the time as expired before the setup is completed. NB. There is currently a maximum number of 64 deadline timers that can be active at any time.

This isn't a trivial routine, it involves several system calles, and alot of mucking about. Avoid calling it excessively.


const bool & IsTimeUp() const
Has dead line been reached ?

bool IsRunning() const
Is timer still running ?

BooleanT IsVirtual() const
Is virtual timer.

RealT Remaining() const
Get an estimate of the time remaining on deadline.
If dead line has expired 0 is returned.

BooleanT WaitForIt() const
Wait for deadline to expire.
May return false if no deadline pending, which could happen if the timer expires before the call.


Programmer:Charles Galambos, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001