Sunshine0.0.5917
Sunshine 0.0.5917
Self-hosted game stream host for Moonlight.
Loading...
Searching...
No Matches
platf::high_precision_timer Struct Referenceabstract

Platform timer object used for precise frame pacing. More...

#include <src/platform/common.h>

Inheritance diagram for platf::high_precision_timer:
Collaboration diagram for platf::high_precision_timer:

Public Member Functions

virtual operator bool ()=0
 Explicitly check if platform-specific timer backend has been initialized successfully.
virtual void sleep_for (const std::chrono::nanoseconds &duration)=0
 Sleep for the duration.

Detailed Description

Platform timer object used for precise frame pacing.

Member Function Documentation

◆ operator bool()

virtual platf::high_precision_timer::operator bool ( )
explicitpure virtual

Explicitly check if platform-specific timer backend has been initialized successfully.

Returns
true on success, false on error

Implemented in platf::linux_high_precision_timer, platf::macos_high_precision_timer, and platf::win32_high_precision_timer.

◆ sleep_for()

virtual void platf::high_precision_timer::sleep_for ( const std::chrono::nanoseconds & duration)
pure virtual

Sleep for the duration.

Parameters
durationSleep duration

Implemented in platf::linux_high_precision_timer, platf::macos_high_precision_timer, and platf::win32_high_precision_timer.


The documentation for this struct was generated from the following file: