[ROOT] >1 TTimers

From: Vitaliy Vziskin (vziskin@blast01.mit.edu)
Date: Thu Apr 26 2001 - 20:57:44 MEST


	I have trouble with running multiple TTimers.  The following code
works only if I turn only one TTimer on.  It does not work with two or
more.


{
  gROOT->Reset();
  TTimer *timer1 = new TTimer(2000,kFALSE);
  timer1->TurnOn(); //-----------------------> works if this is commented
  TTimer *timer = new TTimer(2000,kFALSE);
  timer->TurnOn();
  int i = 0;
  while (i <= 10){
    if(timer->HasTimedOut())
      {
	printf("timer has run out @ %s\n",timer->GetTime()->AsString());
	timer->Reset();
	i++;
      }
  }
  delete timer;
  delete timer1;
}
	Would anyone know what this problem means.

		Sincerely, Vitaliy

-- 
=====================================================================
Vitaliy Ziskin                                Tel: (617)253-9209
MIT 26-547                          http://www.lns.mit.edu/people/vziskin/
77 Massachusetts Ave
Cambridge, Ma
02139
======================================================================
        "For long you live and high you fly
         And smiles you'll give and tears you'll cry
         And all you touch and all you see
         Is all your life will ever be"--Pink Floyd



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:43 MET