Last change
on this file since 390 was
347,
checked in by ymipsl, 12 years ago
|
- Supress lot of shared_ptr
- instrument code for vampir-trace and timer diagnostic
YM
|
File size:
530 bytes
|
Rev | Line | |
---|
[347] | 1 | #ifndef __TIMER_HPP__ |
---|
| 2 | #define __TIMER_HPP__ |
---|
| 3 | |
---|
| 4 | #include <string> |
---|
| 5 | #include <map> |
---|
| 6 | |
---|
| 7 | namespace xios |
---|
| 8 | { |
---|
| 9 | using namespace std ; |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | class CTimer |
---|
| 13 | { |
---|
| 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 | |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.