VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
79  inline void setUsePerfCounter(bool val) { myUsePerfCounter = val; }
80  inline bool usePerfCounter() const { return myUsePerfCounter; }
81 
82 public:
83 
85  static const double hour2sec;
86  static const double sec2hour;
87 
88 protected:
89 
92 
95 
100 
102 
105 
108 #ifdef _WIN32
109  double myCounterAtInitialTime;
110  double myCounterFreq;
111 #endif
112 };
113 
119 
120 
121 #define DtHour2Sec DtClock::hour2sec
122 #define DtSec2Hour DtClock::sec2hour
123 
124 
127 DT_DLL_VLUTIL void DtSetSimTime(DtTime NewSimTime);
131 
136 
137 #ifdef DtUSE_UTILITIES_NAMESPACE
138 }
139 #endif

Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (www.mak.com)