Platform timer object used for precise frame pacing. More...
#include <src/platform/common.h>
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. | |
Platform timer object used for precise frame pacing.
|
explicitpure virtual |
Explicitly check if platform-specific timer backend has been initialized successfully.
Implemented in platf::linux_high_precision_timer, platf::macos_high_precision_timer, and platf::win32_high_precision_timer.
|
pure virtual |
Sleep for the duration.
| duration | Sleep duration |
Implemented in platf::linux_high_precision_timer, platf::macos_high_precision_timer, and platf::win32_high_precision_timer.