11#ifndef NNGN_TIMING_TIMING_H
12#define NNGN_TIMING_TIMING_H
21 using clock = std::chrono::steady_clock;
29 duration::rep
now_ns(
void)
const;
30 duration::rep
now_us(
void)
const;
31 duration::rep
now_ms(
void)
const;
32 duration::rep
now_s(
void)
const;
37 duration::rep
dt_ns(
void)
const;
38 duration::rep
dt_us(
void)
const;
39 duration::rep
dt_ms(
void)
const;
40 duration::rep
dt_s(
void)
const;
44 float fdt_s(
void)
const;
49 const auto t0 = Timing::clock::now();
51 return Timing::clock::now() - t0;
std::uint64_t u64
Definition def.h:15
clock::time_point time_point
Definition timing.h:22
std::chrono::steady_clock clock
Definition timing.h:21
duration::rep now_us(void) const
Definition timing.cpp:19
float fnow_ns(void) const
Definition timing.cpp:27
float fnow_s(void) const
Definition timing.cpp:30
time_point now
Definition timing.h:24
duration::rep dt_ms(void) const
Definition timing.cpp:39
duration::rep now_ms(void) const
Definition timing.cpp:20
float fdt_ns(void) const
Definition timing.cpp:47
duration::rep dt_s(void) const
Definition timing.cpp:40
u64 frame
Definition timing.h:25
static duration time(F &&f)
Definition timing.h:48
float scale
Definition timing.h:27
float fdt_ms(void) const
Definition timing.cpp:49
float fdt_s(void) const
Definition timing.cpp:50
duration::rep dt_us(void) const
Definition timing.cpp:38
float fnow_ms(void) const
Definition timing.cpp:29
duration::rep now_s(void) const
Definition timing.cpp:21
clock::duration duration
Definition timing.h:23
duration::rep dt_ns(void) const
Definition timing.cpp:37
duration dt
Definition timing.h:26
float fdt_us(void) const
Definition timing.cpp:48
void update(void)
Definition timing.cpp:52
float fnow_us(void) const
Definition timing.cpp:28
duration::rep now_ns(void) const
Definition timing.cpp:18