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

Method when

src/gate.rs:72–83  ·  view source on GitHub ↗
(&mut self, cond: CondFn, then: ExecFn)

Source from the content-addressed store, hash-verified

70 }
71
72 pub fn when(&mut self, cond: CondFn, then: ExecFn) -> &mut Self {
73 if self.compiled {
74 return self;
75 }
76
77 self.target_times.push(0);
78 self.durations.push(0);
79 self.conditions.push(cond);
80 self.functions.push(then);
81 self.tail += 1;
82 return self;
83 }
84
85 pub fn when_nano(&mut self, duration_nanos: uNano, then: ExecFn) -> &mut Self {
86 if self.compiled {

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected