24 #ifndef PXR_BASE_TF_STOPWATCH_H
25 #define PXR_BASE_TF_STOPWATCH_H
33 #include "pxr/base/tf/api.h"
37 PXR_NAMESPACE_OPEN_SCOPE
99 _sampleCount += t._sampleCount;
139 uint64_t _nTicks = 0;
140 uint64_t _startTick = 0;
141 size_t _sampleCount = 0;
152 PXR_NAMESPACE_CLOSE_SCOPE
154 #endif // PXR_BASE_TF_STOPWATCH_H
ARCH_API double ArchTicksToSeconds(uint64_t nTicks)
Convert a duration measured in "ticks", as returned by ArchGetTickTime(), to seconds.
uint64_t ArchGetTickTime()
Return the current time in system-dependent units.
int64_t GetMicroseconds() const
Return the accumulated time in microseconds.
ARCH_API int64_t ArchTicksToNanoseconds(uint64_t nTicks)
Convert a duration measured in "ticks", as returned by ArchGetTickTime(), to nanoseconds.
Low-cost, high-resolution timer datatype.
void Reset()
Resets the accumulated time and the sample count to zero.
int64_t GetNanoseconds() const
Return the accumulated time in nanoseconds.
double GetSeconds() const
Return the accumulated time in seconds as a double.
void Stop()
Increases the accumulated time stored in the TfStopwatch.
void AddFrom(const TfStopwatch &t)
Adds the accumulated time and sample count from t into the TfStopwatch.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
void Start()
Record the current time for use by the next Stop() call.
int64_t GetMilliseconds() const
Return the accumulated time in milliseconds.
size_t GetSampleCount() const
Return the current sample count.
High-resolution, low-cost timing routines.