MCPcopy Create free account
hub / github.com/SharpCoder/teensycore / when_nano

Method when_nano

src/gate.rs:85–96  ·  view source on GitHub ↗
(&mut self, duration_nanos: uNano, then: ExecFn)

Source from the content-addressed store, hash-verified

83 }
84
85 pub fn when_nano(&mut self, duration_nanos: uNano, then: ExecFn) -> &mut Self {
86 if self.compiled {
87 return self;
88 }
89
90 self.target_times.push(0);
91 self.durations.push(duration_nanos);
92 self.conditions.push(when_cond);
93 self.functions.push(then);
94 self.tail += 1;
95 return self;
96 }
97
98 /// If called, this gate will only ever execute one time.
99 pub fn once(&mut self, func: ExecFn) -> &mut Self {

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected