BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
WallclockTimer.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Fit/Tools/WallclockTimer.h
6 //! @brief Defines WallclockTimer class.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************** //
14 
15 #ifndef BORNAGAIN_FIT_TOOLS_WALLCLOCKTIMER_H
16 #define BORNAGAIN_FIT_TOOLS_WALLCLOCKTIMER_H
17 
18 #include <memory>
19 
20 struct WallclockTimerState;
21 
22 //! A timer for measuring real (wall-clock) time spent between 'start' and 'stop' commands.
23 
25 {
26 public:
29 
30  void start();
31  void stop();
32 
33  //! returns run time in sec.
34  double runTime() const;
35 
36 private:
37  std::unique_ptr<WallclockTimerState> m_state;
38 };
39 
40 #endif // BORNAGAIN_FIT_TOOLS_WALLCLOCKTIMER_H
A timer for measuring real (wall-clock) time spent between 'start' and 'stop' commands.
double runTime() const
returns run time in sec.
std::unique_ptr< WallclockTimerState > m_state
Internal state of a WallclockTimer object.