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

Function state

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

Source from the content-addressed store, hash-verified

114}
115
116fn state() -> &'static WatchState {
117 static S: OnceLock<WatchState> = OnceLock::new();
118 S.get_or_init(|| WatchState {
119 crown_bits: AtomicU64::new(0),
120 touch_x: std::array::from_fn(|_| AtomicU64::new(0)),
121 touch_y: std::array::from_fn(|_| AtomicU64::new(0)),
122 touch_active: std::array::from_fn(|_| AtomicU64::new(0)),
123 screen_w: AtomicU64::new(198f64.to_bits()),
124 screen_h: AtomicU64::new(242f64.to_bits()),
125 target_fps: AtomicI64::new(30),
126 start: OnceLock::new(),
127 last_frame_ns: AtomicU64::new(0),
128 frame_count: AtomicUsize::new(0),
129 })
130}
131
132fn now_nanos() -> u64 {
133 let s = state();

Callers 15

now_nanosFunction · 0.85
add_crownFunction · 0.85
consume_crownFunction · 0.85
bloom_watchos_touchFunction · 0.85
bloom_watchos_set_screenFunction · 0.85
bloom_get_screen_widthFunction · 0.85
bloom_get_screen_heightFunction · 0.85
bloom_get_touch_xFunction · 0.85
bloom_get_touch_yFunction · 0.85
bloom_get_touch_countFunction · 0.85
bloom_get_delta_timeFunction · 0.85
bloom_get_fpsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected