MCPcopy Create free account
hub / github.com/17cupsofcoffee/nova / tick_until_update_ready

Method tick_until_update_ready

src/time.rs:29–40  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

27 }
28
29 pub fn tick_until_update_ready(&mut self) {
30 self.advance_time();
31
32 // TODO: This isn't accurate enough - need to sleep and then spin.
33 while self.accumulated_time < self.target_time {
34 std::thread::sleep(Duration::from_millis(1));
35
36 self.advance_time();
37 }
38
39 self.cap_accumulated_time();
40 }
41
42 pub fn reset(&mut self) {
43 self.last_time = Instant::now();

Callers 1

runMethod · 0.80

Calls 2

advance_timeMethod · 0.80
cap_accumulated_timeMethod · 0.80

Tested by

no test coverage detected