Computer Assited Medical Intervention Tool Kit
version 3.3
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
modeling
libraries
mml
monitoring
tools
Chrono.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* $CAMITK_LICENCE_BEGIN$
3
*
4
* CamiTK - Computer Assisted Medical Intervention ToolKit
5
* (c) 2001-2014 UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
6
*
7
* Visit http://camitk.imag.fr for more information
8
*
9
* This file is part of CamiTK.
10
*
11
* CamiTK is free software: you can redistribute it and/or modify
12
* it under the terms of the GNU Lesser General Public License version 3
13
* only, as published by the Free Software Foundation.
14
*
15
* CamiTK is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Lesser General Public License version 3 for more details.
19
*
20
* You should have received a copy of the GNU Lesser General Public License
21
* version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22
*
23
* $CAMITK_LICENCE_END$
24
****************************************************************************/
25
26
27
#ifndef TOOLS_CHRONO_H
28
#define TOOLS_CHRONO_H
29
30
#include <iostream>
40
class
Chrono
{
41
public
:
43
Chrono
();
45
Chrono
(
double
);
46
47
~Chrono
();
48
50
void
start
();
52
void
start
(
double
);
54
double
stop
();
55
57
void
hold
(
bool
);
58
60
void
reset
();
61
67
double
get
()
const
;
68
70
friend
std::ostream &
operator <<
(std::ostream &,
const
Chrono
);
71
72
private
:
73
double
startValue
;
74
double
stopValue
;
75
bool
running
;
76
double
accumulatedTime
;
77
79
double
getTimeInMilliseconds
()
const
;
80
};
81
82
#endif // TOOLS_CHRONO_H
Chrono
Elapsed real-time timer.
Definition:
Chrono.h:40
Chrono::accumulatedTime
double accumulatedTime
Definition:
Chrono.h:76
Chrono::~Chrono
~Chrono()
Chrono::stop
double stop()
stop chrono
Chrono::startValue
double startValue
Definition:
Chrono.h:73
Chrono::stopValue
double stopValue
Definition:
Chrono.h:74
Chrono::reset
void reset()
reset to zero
Chrono::hold
void hold(bool)
pause the chrono if the parameter is true
Chrono::operator<<
friend std::ostream & operator<<(std::ostream &, const Chrono)
print the value of the chrono on the stream
Chrono::start
void start()
start at zero
Chrono::getTimeInMilliseconds
double getTimeInMilliseconds() const
in milliseconds
Chrono::Chrono
Chrono()
default constructor
Chrono::running
bool running
Definition:
Chrono.h:75
Generated on Wed May 7 2014 06:43:06 for Computer Assited Medical Intervention Tool Kit by
1.8.6