Changeset 895 in Sophya for trunk/SophyaLib/SysTools/ctimer.cc


Ignore:
Timestamp:
Apr 12, 2000, 7:49:54 PM (25 years ago)
Author:
ansari
Message:

Documentation de fichiers - Reza 12/4/2000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SysTools/ctimer.cc

    r241 r895  
    11//
    2 // $Id: ctimer.cc,v 1.2 1999-04-21 13:11:59 ansari Exp $
     2// $Id: ctimer.cc,v 1.3 2000-04-12 17:49:40 ansari Exp $
    33//
    44
     
    88//++
    99// Class        Timer
    10 // Lib          Outils++
     10// Lib          SysTools
    1111// include      ctimer.h
    1212//
     
    3737//--
    3838
     39/*!
     40  \class SOPHYA::Timer
     41  This class implements a simple chronometer which can be used for
     42  measuring the CPU and elapsed time in functions. The constructor
     43  keeps the start time (and CPU time) and an optional message.
     44  The \b Split method displays the partial time, and destructor
     45  displays the total CPU and elapsed time since timer creation.
     46  The macro \b  TIMEF create a timer object with the function name.
     47  The macro \b  SPLITTIME calls the split methode for the timer created
     48  by TIMEF. A named timer can be created using the macro \b TIMEN(nom)
     49*/
     50
     51/*! Constructor with the specification of a optional name or message */
    3952Timer::Timer(const char* name)
    4053: timerName(name)
     
    5366//--
    5467
    55 
     68/*! Method which displays the partial CPU and elapsed time
     69    An optional message can be passed to be used instead of the
     70    timer name
     71*/
    5672void Timer::Split(const char* comm)
    5773{
     
    6581  int etmt = elapse - elapse0;
    6682
    67   cout << "***Timing " << (comm ? comm : timerName) << endl;
     83  cout << "***Timing " << (comm ? comm : timerName.c_str()) << endl;
    6884
    6985// Pour des formats comme ca, la syntaxe printf est plus agreable.
Note: See TracChangeset for help on using the changeset viewer.