TachyonUI
0.1.0
High-performance UI for building tools.
Toggle main menu visibility
Loading...
Searching...
No Matches
gui_frame_clock.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
5
namespace
tachyon
6
{
9
16
class
FrameClock
17
{
18
public
:
21
void
Tick
(int64_t nowNanos,
float
refreshHz);
22
24
double
Seconds
()
const
{
return
m_seconds; }
26
double
DeltaSeconds
()
const
{
return
m_deltaSeconds; }
27
28
private
:
29
int64_t m_originNanos = 0;
30
bool
m_started =
false
;
31
double
m_seconds = 0.0;
32
double
m_deltaSeconds = 0.0;
33
};
34
35
}
tachyon::FrameClock
Animation time locked to the display refresh.
Definition
gui_frame_clock.h:17
tachyon::FrameClock::Seconds
double Seconds() const
Seconds since the first Tick.
Definition
gui_frame_clock.h:24
tachyon::FrameClock::DeltaSeconds
double DeltaSeconds() const
Seconds the last Tick advanced; 0 on the first.
Definition
gui_frame_clock.h:26
tachyon::FrameClock::Tick
void Tick(int64_t nowNanos, float refreshHz)
Advances the clock; call once per frame, before anything reads the time.
tachyon
Definition
gui_logging.h:24
gui_core
frame
gui_frame_clock.h
Generated by
1.18.0