Skip to content

improve module timing

@NickMilef I quickly made this based on the way you handle frequency in the logger you created. Could you give me your thoughts on what strategy would be the best between those two?

  • Current implementation: using sleep_for

    • pros: will stop the thread and will not frenetically keep looping in the while loop. (does that actually matter?)
    • cons: might sleep too long?
  • Offered implementation: this commit

    • pros: as soon as elapsed > loopDelay, run module (won't "sleep" too long)
    • cons: keeps rolling in the while loop. Could that be an issue?

Merge request reports