twitchdev / extensions-hello-world

The Simplest Extension in the (Hello) World
Apache License 2.0
177 stars 85 forks source link

Scheduling backend color broadcast with correct timeout #29

Closed cactysman closed 3 years ago

cactysman commented 4 years ago

Since there obviously is a cooldown set when we get to this condition, we need to subtract cooldown.time from now instead of subtracting now from cooldown.time, since cooldown.time is always greater than the current timestamp.

This currently results in negative timeout delays and fires the task immediately.