ICF 3.0.5.47
Technical documentation of ICF Libraries
CGeneralTimeStamp.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// Qt includes
10#include <QtCore/QObject>
11#include <QtCore/QElapsedTimer>
12
13// ICF includes
14#include <istd/ITimeStamp.h>
15
16
17namespace istd
18{
19
20
24class CGeneralTimeStamp: virtual public ITimeStamp
25{
26public:
28
29 double GetTimeTo(const CGeneralTimeStamp& timeStamp) const;
30
31 // reimplemented (istd::ITimeStamp)
32 virtual void Start(double elapsedTime = 0);
33 virtual QDateTime GetStartTime() const;
34 virtual double GetElapsed() const;
35 virtual double GetTimeTo(const ITimeStamp& timeStamp) const;
36 virtual void WaitTo(double time) const;
37 virtual double GetTimerResolution() const;
38
39private:
40 QElapsedTimer m_timer;
41
42 double m_timeShift;
43};
44
45
46} // namespace istd
47
48
A general time stamp implementation.
virtual void WaitTo(double time) const
Wait for specific timer elapsed value is reached.
virtual double GetTimeTo(const ITimeStamp &timeStamp) const
Get time difference to second timer.
virtual double GetTimerResolution() const
Return the timer resolution in seconds.
virtual void Start(double elapsedTime=0)
Start the timer.
virtual double GetElapsed() const
Return the time in seconds from start until this call.
virtual QDateTime GetStartTime() const
Get point in time of latest start.
double GetTimeTo(const CGeneralTimeStamp &timeStamp) const
Common interface for timer implementations.
Definition ITimeStamp.h:26
Standard library.
Definition IComponent.h:17

© Witold Gantzke and Kirill Lepskiy