Ignore:
Timestamp:
07/24/15 16:40:06 (9 years ago)
Author:
rlacroix
Message:

Timer: Avoid using heap allocations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/timer.hpp

    r501 r652  
    77namespace xios 
    88{ 
    9   using namespace std ; 
    10    
    11    
    129  class CTimer 
    1310  { 
    14     public : 
    15      
    16     double cumulatedTime ; 
    17     double lastTime ; 
    18     bool suspended ; 
    19     string name ; 
    20      
    21     CTimer(const string& name) ; 
    22     void suspend(void) ; 
    23     void resume(void) ; 
    24     void reset(void) ; 
    25     double getCumulatedTime(void) ; 
    26     static map<string,CTimer*> allTimer ; 
    27     static double getTime(void) ; 
    28     static CTimer& get(string name) ; 
    29   } ; 
    30  
     11    public: 
     12      double cumulatedTime; 
     13      double lastTime; 
     14      bool suspended; 
     15      std::string name; 
     16       
     17      CTimer(const std::string& name); 
     18      void suspend(void); 
     19      void resume(void); 
     20      void reset(void); 
     21      double getCumulatedTime(void); 
     22      static std::map<std::string,CTimer> allTimer; 
     23      static double getTime(void); 
     24      static CTimer& get(std::string name); 
     25  }; 
    3126} 
    3227 
Note: See TracChangeset for help on using the changeset viewer.