BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
WallclockTimer.h
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
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
#ifdef SWIG
16
#error no need to expose this header to Swig
17
#endif
18
19
#ifndef USER_API
20
#ifndef BORNAGAIN_FIT_TOOLS_WALLCLOCKTIMER_H
21
#define BORNAGAIN_FIT_TOOLS_WALLCLOCKTIMER_H
22
23
#include <memory>
24
25
struct
WallclockTimerState;
26
27
//! A timer for measuring real (wall-clock) time spent between 'start' and 'stop' commands.
28
29
class
WallclockTimer
{
30
public
:
31
WallclockTimer
();
32
~WallclockTimer
();
33
34
void
start
();
35
void
stop
();
36
37
//! Returns run time in sec.
38
double
runTime
()
const
;
39
40
private
:
41
std::unique_ptr<WallclockTimerState>
m_state
;
42
};
43
44
#endif
// BORNAGAIN_FIT_TOOLS_WALLCLOCKTIMER_H
45
#endif
// USER_API
WallclockTimer
A timer for measuring real (wall-clock) time spent between 'start' and 'stop' commands.
Definition:
WallclockTimer.h:29
WallclockTimer::runTime
double runTime() const
Returns run time in sec.
Definition:
WallclockTimer.cpp:47
WallclockTimer::~WallclockTimer
~WallclockTimer()
WallclockTimer::WallclockTimer
WallclockTimer()
Definition:
WallclockTimer.cpp:29
WallclockTimer::start
void start()
Definition:
WallclockTimer.cpp:35
WallclockTimer::stop
void stop()
Definition:
WallclockTimer.cpp:41
WallclockTimer::m_state
std::unique_ptr< WallclockTimerState > m_state
Definition:
WallclockTimer.h:41
Fit
Tools
WallclockTimer.h
Generated by
1.9.1