CPerformanceTimeStamp.h
Go to the documentation of this file.
1 #ifndef iwin_CPerformanceTimeStamp_included
2 #define iwin_CPerformanceTimeStamp_included
3 
4 
5 // ACF includes
6 #include "istd/ITimeStamp.h"
7 
8 
9 namespace iwin
10 {
11 
12 
19 {
20 public:
22  explicit CPerformanceTimeStamp(quint64 nativeValue);
23 
24  bool IsVaild() const;
25 
26  double GetTimeTo(const CPerformanceTimeStamp& timeStamp) const;
27 
28  quint64 GetNativeRepresentation() const;
29  void SetNativeRepresentation(quint64 value);
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 istd::ITimeStamp& timeStamp) const;
36  virtual void WaitTo(double time) const;
37  virtual double GetTimerResolution() const;
38 
39  // reimplemented (istd::IChangeable)
40  virtual int GetSupportedOperations() const;
41  virtual bool CopyFrom(const istd::IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS);
42 
43 private:
44  qint64 m_startCounter;
45 
46  // static attributes
47  static qint64 s_timerFrequence;
48  static bool s_isTimerFrequenceValid;
49 };
50 
51 
52 // inline methods
53 
54 } // namespace iwin
55 
56 
57 #endif // !iwin_CPerformanceTimeStamp_included
virtual bool CopyFrom(const istd::IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
double GetTimeTo(const CPerformanceTimeStamp &timeStamp) const
virtual double GetElapsed() const
virtual QDateTime GetStartTime() const
virtual void WaitTo(double time) const
virtual void Start(double elapsedTime=0)
virtual int GetSupportedOperations() const
High perfomance time stamp implementation.
virtual double GetTimerResolution() const
quint64 GetNativeRepresentation() const
void SetNativeRepresentation(quint64 value)

© 2007-2011 Witold Gantzke and Kirill Lepskiy