NorMIT-nav
22.09
An IGT application
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
i
l
m
o
p
q
r
s
t
u
v
w
Variables
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Typedefs
a
b
c
d
e
f
i
j
l
m
n
o
p
r
s
t
v
Enumerations
Enumerator
a
c
d
g
h
i
l
n
p
r
s
t
u
v
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
v
Variables
c
f
i
l
m
o
p
q
r
s
t
v
Typedefs
c
d
f
h
m
o
p
q
s
u
v
Macros
_
a
b
c
d
e
f
g
i
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
cxTimeKeeper.cpp
Go to the documentation of this file.
1
/*=========================================================================
2
This file is part of CustusX, an Image Guided Therapy Application.
3
4
Copyright (c) SINTEF Department of Medical Technology.
5
All rights reserved.
6
7
CustusX is released under a BSD 3-Clause license.
8
9
See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10
=========================================================================*/
11
12
13
#include "
cxTimeKeeper.h
"
14
#include "
cxLogger.h
"
15
#include "
cxReporter.h
"
16
17
namespace
cx
18
{
19
20
TimeKeeper::TimeKeeper
() : mTime(QDateTime::currentDateTime()) {}
21
22
void
TimeKeeper::printElapsedSeconds
(QString text)
23
{
24
reporter
()->sendDebug(text +
": "
+ this->
getElapsedSecondsAsString
() +
"s"
);
25
}
26
void
TimeKeeper::printElapsedms
(QString text)
const
27
{
28
reporter
()->sendDebug(QString(text +
": %1"
).arg(
getElapsedms
()));
29
}
30
31
QString
TimeKeeper::getElapsedSecondsAsString
()
const
32
{
33
double
secs = double(this->
getElapsedms
())/1000;
34
return
QString(
"%1"
).arg(secs, 0,
'f'
, 2);
35
}
36
int
TimeKeeper::getElapsedms
()
const
37
{
38
return
mTime.msecsTo(QDateTime::currentDateTime());
39
}
40
41
void
TimeKeeper::reset
()
42
{
43
mTime = QDateTime::currentDateTime();
44
}
45
46
}
// namespace cx
cx::TimeKeeper::TimeKeeper
TimeKeeper()
Definition:
cxTimeKeeper.cpp:20
cxLogger.h
cx
Namespace for all CustusX production code.
Definition:
cx_dev_group_definitions.h:13
cx::TimeKeeper::reset
void reset()
Definition:
cxTimeKeeper.cpp:41
cx::TimeKeeper::getElapsedms
int getElapsedms() const
Definition:
cxTimeKeeper.cpp:36
cx::TimeKeeper::getElapsedSecondsAsString
QString getElapsedSecondsAsString() const
Definition:
cxTimeKeeper.cpp:31
cxReporter.h
cx::reporter
ReporterPtr reporter()
Definition:
cxReporter.cpp:36
cxTimeKeeper.h
cx::TimeKeeper::printElapsedSeconds
void printElapsedSeconds(QString text="Elapsed time")
Definition:
cxTimeKeeper.cpp:22
cx::TimeKeeper::printElapsedms
void printElapsedms(QString text="Elapsed") const
Definition:
cxTimeKeeper.cpp:26
CX
source
resource
core
utilities
cxTimeKeeper.cpp
Generated on Tue Sep 13 2022 11:06:16 for NorMIT-nav by
1.8.17