Re: evaluating time spend ?

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Thu Mar 23 2000 - 17:30:51 MET


Vincent,

   use a TStopwatch object. Like:

TStopwatch timer;

timer.Start();

<do something>

timer.Print();   // stops and prints elapsed real and cpu time


timer.Start();   // resets and start timer again

<do more>

timer.Print();   // print elapsed times since last start



Cheers, Fons.


Vincent Colin de Verdiere wrote:
> 
> hi rooters!
> 
> I'm looking for a simple way to evaluate the time spend in my different
> functions. Is there a similar command to the shell "time" command
> accessible in the root interpreter ?
> 
> -- Vincent
> 
> Vincent Colin de Verdiere (vincent.colin.de.verdiere@cern.ch)
> at work: CERN, division EP, Office 13-1-038, CH - 1211 Geneva 23
>         tel: (+41) 22 76 72839, fax: (+41) 22 767 9075

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:21 MET