HPInc / HP-Digital-Microfluidics

HP Digital Microfluidics Software Platform and Libraries
MIT License
2 stars 0 forks source link

System.call_after and after_tick #182

Open EvanKirshenbaum opened 5 months ago

EvanKirshenbaum commented 5 months ago

Looking at System.call_after and System.after_tick, the delta and fn arguments order is swapped:

def call_after(self, delta: Time, fn: TimerFunc
def after_tick(self, fn: ClockCallback, *, delta: DelayType=Ticks.ZERO)

I wonder if we want to make the arguments order consistent, either delta first or fn first.

Migrated from internal repository. Originally created by Rares Vernica on Jun 21, 2022 at 5:50 PM PDT.
EvanKirshenbaum commented 5 months ago

The argument order follows the name "Call after delta (this function)" and "After the tick call this function (this many ticks away)".

Migrated from internal repository. Originally created by @EvanKirshenbaum on Jun 22, 2022 at 10:12 AM PDT.