source: trunk/MagicSoft/Cosy/base/MTimeout.cc@ 7553

Last change on this file since 7553 was 2518, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 463 bytes
Line 
1#include "MTimeout.h"
2
3#include <TSystem.h>
4
5MTimeout::MTimeout(unsigned long ms=500) : fTimeout((ULong_t)gSystem->Now()+ms)
6{
7 // Use SetTime to change the timing
8 // if (ms) TurnOn(); // Add to system list
9}
10
11bool MTimeout::HasTimedOut()
12{
13 return fTimeout<(ULong_t)gSystem->Now();
14}
15
16void MTimeout::Start(unsigned long ms=500)
17{
18 fTimeout = (ULong_t)gSystem->Now()+ms;
19 //Reset(); // reset before adding
20 //TurnOn(); // Add to system list
21}
Note: See TracBrowser for help on using the repository browser.