VR-Link API Documentation for DIS
vlTime.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *******************************************************************************/
5 #pragma once
6 
10 #include "vlMachineTypes.h"
11 
12 #ifdef DtUSE_UTILITIES_NAMESPACE
13 namespace DtUSE_UTILITIES_NAMESPACE
14 {
15 #endif
16 
17 
19 typedef DtReal DtTime;
20 
26 {
27 public:
28 
31  DtClock();
32 
34  DtClock(const DtClock &orig);
35 
37  DtClock & operator=(const DtClock &orig);
38 
40  virtual ~DtClock();
41 
44  virtual void init();
45 
47  virtual DtTime simTime() const;
48 
52  virtual void setSimTime(DtTime NewSimTime);
53 
56  virtual bool isSimTimeSet() const;
57 
59  virtual DtTime elapsedRealTime() const;
60 
63  virtual DtTime approximateElapsedRealTime() const;
64 
66  virtual bool useSimTimeForApproxRealTime() const;
67 
70  virtual void setUseSimTimeForApproxRealTime();
71  virtual void clearUseSimTimeForApproxRealTime();
72 
74  virtual DtTime absRealTime() const;
75 
76 public:
77 
79  static const double hour2sec;
80  static const double sec2hour;
81 
82 protected:
83 
86 
89 
94 
96 
99 
100 #ifdef _WIN32
101  int myUsePerfCounter;
102  double myCounterAtInitialTime;
103  double myCounterFreq;
104 #endif
105 };
106 
112 
113 
114 #define DtHour2Sec DtClock::hour2sec
115 #define DtSec2Hour DtClock::sec2hour
116 
117 
120 DT_DLL_VLUTIL void DtSetSimTime(DtTime NewSimTime);
124 
129 
130 #ifdef DtUSE_UTILITIES_NAMESPACE
131 }
132 #endif

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)