Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns a GameInput timestamp, taken at the moment the method is called.
Syntax
uint64_t GetCurrentTimestamp();
Parameters
None.
Return value
Type: uint64_t
Timestamp measure in microseconds.
Remarks
The GameInput API uses microseconds as the currency for its timestamps and other temporal functionality. Using a monotonically increasing counter instead of the system time ensures that no jitter is introduced as a result of system clock adjustments. Several methods within the GameInput API either return timestamp values or take timestamp values as an input. This method enables applications to reason about the values of other timestamps, relative to the present.
You can use GetCurrentTimeStamp to reason about readings and when they happened relative to now by comparing the results with the results of IGameInputReading::GetTimeStamp.
Requirements
Header: GameInput.h
Library: gameinput.lib
Supported platforms: Windows
See also
Input API Overview IGameInput IGameInputReading::GetTimeStamp IGameInputDevice::SetRumbleState