TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
gui_frame_clock.h File Reference
#include <cstdint>

Go to the source code of this file.

Classes

class  tachyon::FrameClock
 Animation time locked to the display refresh. More...
class  tachyon::VsyncLock
 Whether frames are locked to the vsync, told by how long presenting them waited. More...

Namespaces

namespace  tachyon

Functions

double tachyon::FramePaceWaitSeconds (int64_t frameStartNanos, int64_t nowNanos, float refreshHz)
 How long to wait after presenting a frame, in seconds, so the loop doesn't run faster than the display shows frames.

Variables

constexpr double tachyon::kFramePaceShare = 0.95
 The share of a refresh period a frame takes at least when GUIApplication::Run paces it.
constexpr double tachyon::kFramePaceMinWaitSeconds = 0.00025
 A wait shorter than this is skipped: it costs about as much as it saves.