Carna  Version 3.3.2
Stopwatch.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 - 2015 Leonid Kostrykin
3  *
4  * Chair of Medical Engineering (mediTEC)
5  * RWTH Aachen University
6  * Pauwelsstr. 20
7  * 52074 Aachen
8  * Germany
9  *
10  */
11 
12 #ifndef STOPWATCH_H_6014714286
13 #define STOPWATCH_H_6014714286
14 
19 #include <Carna/Carna.h>
20 
21 namespace Carna
22 {
23 
24 namespace base
25 {
26 
27 
28 
29 // ----------------------------------------------------------------------------------
30 // Stopwatch
31 // ----------------------------------------------------------------------------------
32 
40 class CARNA_LIB Stopwatch
41 {
42 
44 
45  double time0;
46 
47 public:
48 
52  Stopwatch();
53 
57  void restart();
58 
62  double result() const;
63 
64 }; // Stopwatch
65 
66 
67 
68 } // namespace Carna :: base
69 
70 } // namespace Carna
71 
72 #endif // STOPWATCH_H_6014714286
Implements stopwatch using the robust wallclock time from OMP that most compilers support...
Definition: Stopwatch.h:40
#define NON_COPYABLE
Features class it is placed in as non-copyable.
Definition: noncopyable.h:109