NorMIT-nav  22.09
An IGT application
cxTimeKeeper.h
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 #ifndef CXTIMEKEEPER_H_
13 #define CXTIMEKEEPER_H_
14 
15 #include "cxResourceExport.h"
16 
17 #include <QDateTime>
18 #include <QString>
19 
20 namespace cx
21 {
22 
30 class cxResource_EXPORT TimeKeeper
31 {
32 public:
33  TimeKeeper();
34  void printElapsedSeconds(QString text="Elapsed time");
35  void printElapsedms(QString text="Elapsed") const;
36  QString getElapsedSecondsAsString() const;
37  int getElapsedms() const;
38  void reset();
39 
40 private:
41  QDateTime mTime;
42 };
43 
44 } // namespace cx
45 
46 #endif // CXTIMEKEEPER_H_
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::TimeKeeper
Definition: cxTimeKeeper.h:30