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

Last change on this file since 9029 was 8376, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 455 bytes
Line 
1#include "MTimeout.h"
2
3#include <TSystem.h>
4
5MTimeout::MTimeout(unsigned long ms) : 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)
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.