[ROOT] How to use TTimer for a timeout

From: Thomas Bretz (tbretz@astro.uni-wuerzburg.de)
Date: Mon Oct 20 2003 - 18:26:37 MEST


Hi,

I want to have a simple timeout which I can use a conditional on, like:

cout << "Start" << endl;
     TTimer tm(500, kFALSE);
     tm.TurnOn();

     while (!tm.HasTimedOut())
         usleep(1);
     tm.TurnOff();
cout << "Timed out." << endl;

I cannot find out how I can realize this using a TTimer which doesn't
depend on the eventloop (asynchronous).

Maybe somebody can help me?

Thanks in advance,
Thomas.



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET