netxsimdg
Loading...
Searching...
No Matches
ScopedTimer.hpp
Go to the documentation of this file.
1
8#ifndef SRC_INCLUDE_SCOPEDTIMER_HPP
9#define SRC_INCLUDE_SCOPEDTIMER_HPP
10
11#include "Chrono.hpp"
12#include "Timer.hpp"
13
14#include <iostream>
15#include <string>
16
17namespace Nextsim {
18
21public:
24 ScopedTimer(const std::string& name);
26
32 static void setTimerAddress(Timer* timer);
39 void substitute(const std::string& newName);
41 static Timer& timer();
42
43private:
44 static Timer* p_timer;
45};
46
47} /* namespace Nextsim */
48
49#endif /* SRC_INCLUDE_SCOPEDTIMER_HPP */
A class providing a timer aware of the calling context.
static Timer & timer()
Returns a reference to the underlying Timer.
static void setTimerAddress(Timer *timer)
void substitute(const std::string &newName)
A class for a hierarchical timer functions.
Definition Timer.hpp:23