antirez / disque

Disque is a distributed message broker
BSD 3-Clause "New" or "Revised" License
8.01k stars 538 forks source link

job.c: Fix timeout calculation until next event #199

Open justincase opened 7 years ago

justincase commented 7 years ago

Subtracting the awakeme time from the current time is usually negative, causing the loop to continuously run at 1ms intervals.