43 Time() : m_lastTickCount(getTimeTicks()) {}
47 const int64_t lastTickCount = m_lastTickCount;
48 m_lastTickCount = getTimeTicks();
49 return m_lastTickCount - lastTickCount;
54 return getTimeTicks() - m_lastTickCount;
59 return m_lastTickCount;
64 return s_secondsPerTick * ticks;
68 int64_t getTimeTicks()
const;
69 static double getTickDuration();
71 int64_t m_lastTickCount;
72 static const double s_secondsPerTick;
81 #if NV_MICROSOFT_FAMILY 85 NV_INLINE int64_t Nv::Blast::Time::getTimeTicks()
const 88 QueryPerformanceCounter(&a);
92 NV_INLINE double Nv::Blast::Time::getTickDuration()
95 QueryPerformanceFrequency(&a);
96 return 1.0 / (double)a.QuadPart;
103 NV_INLINE int64_t Nv::Blast::Time::getTimeTicks()
const 105 struct timespec mCurrTimeInt;
106 clock_gettime(CLOCK_REALTIME, &mCurrTimeInt);
107 return (static_cast<int64_t>(mCurrTimeInt.tv_sec) * 1000000000) + (
static_cast<int64_t
>(mCurrTimeInt.tv_nsec));
110 NV_INLINE double Nv::Blast::Time::getTickDuration()
117 #include "ps4/NvBlastTimePS4.h" 121 #endif // #ifndef NVBLASTTIME_H int64_t getLastTickCount() const
Definition: NvBlastTime.h:57
static double seconds(int64_t ticks)
Definition: NvBlastTime.h:62
int64_t peekElapsedTicks() const
Definition: NvBlastTime.h:52
Time()
Definition: NvBlastTime.h:43
#define NV_INLINE
Definition: NvPreprocessor.h:350
Definition: NvBlastTime.h:40
int64_t getElapsedTicks()
Definition: NvBlastTime.h:45
Definition: NvBlastArray.h:37