source: XIOS/dev/branch_yushan_merged/src/timer.hpp @ 1160

Last change on this file since 1160 was 1160, checked in by yushan, 7 years ago

fix bad commit. Back to R1155 branch not merged

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
File size: 645 bytes
RevLine 
[688]1#ifndef __XIOS_TIMER_HPP__
2#define __XIOS_TIMER_HPP__
[347]3
4#include <string>
5#include <map>
6
7namespace xios
8{
9  class CTimer
10  {
[652]11    public:
12      double cumulatedTime;
13      double lastTime;
14      bool suspended;
15      std::string name;
[688]16
[652]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;
[1134]23
24      static std::map<std::string,CTimer> *allTimer_ptr;
25      #pragma omp threadprivate(allTimer_ptr)
26     
[652]27      static double getTime(void);
28      static CTimer& get(std::string name);
29  };
[347]30}
31
32
33
34#endif
Note: See TracBrowser for help on using the repository browser.