MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / bloom_get_delta_time

Function bloom_get_delta_time

native/watchos/src/lib.rs:295–300  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

293
294#[no_mangle]
295pub extern "C" fn bloom_get_delta_time() -> f64 {
296 let s = state();
297 let now = now_nanos();
298 let last = s.last_frame_ns.swap(now, Ordering::AcqRel);
299 if last == 0 { 1.0 / 30.0 } else { (now - last) as f64 / 1_000_000_000.0 }
300}
301
302#[no_mangle]
303pub extern "C" fn bloom_get_time() -> f64 {

Callers

nothing calls this directly

Calls 2

stateFunction · 0.85
now_nanosFunction · 0.85

Tested by

no test coverage detected