7#ifndef PXR_BASE_TF_STOPWATCH_H
8#define PXR_BASE_TF_STOPWATCH_H
16#include "pxr/base/tf/api.h"
20PXR_NAMESPACE_OPEN_SCOPE
82 _sampleCount += t._sampleCount;
122 uint64_t _nTicks = 0;
123 uint64_t _startTick = 0;
124 size_t _sampleCount = 0;
135PXR_NAMESPACE_CLOSE_SCOPE
Low-cost, high-resolution timer datatype.
void Start()
Record the current time for use by the next Stop() call.
void Stop()
Increases the accumulated time stored in the TfStopwatch.
double GetSeconds() const
Return the accumulated time in seconds as a double.
void Reset()
Resets the accumulated time and the sample count to zero.
int64_t GetNanoseconds() const
Return the accumulated time in nanoseconds.
int64_t GetMilliseconds() const
Return the accumulated time in milliseconds.
void AddFrom(const TfStopwatch &t)
Adds the accumulated time and sample count from t into the TfStopwatch.
size_t GetSampleCount() const
Return the current sample count.
int64_t GetMicroseconds() const
Return the accumulated time in microseconds.
uint64_t ArchGetStartTickTime()
Get a "start" tick time for measuring an interval of time, followed by a later call to ArchGetStopTic...
uint64_t ArchGetStopTickTime()
Get a "stop" tick time for measuring an interval of time.
ARCH_API double ArchTicksToSeconds(uint64_t nTicks)
Convert a duration measured in "ticks", as returned by ArchGetTickTime(), to seconds.
ARCH_API int64_t ArchTicksToNanoseconds(uint64_t nTicks)
Convert a duration measured in "ticks", as returned by ArchGetTickTime(), to nanoseconds.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
High-resolution, low-cost timing routines.