zorael / kameloso

IRC bot with Twitch support
Boost Software License 1.0
9 stars 3 forks source link

Scheduled Fiber accuracy #95

Closed zorael closed 4 years ago

zorael commented 4 years ago

This changes the way scheduled Fiber timestamps are being stored from being a UNIX timestamp in seconds to being the hecto-nanoseconds that Clock.currStdTime returns. Other timed features, such as periodically, work as they always have.

mainLoop is altered to adjust the socket read timeout to coincide with when the next scheduled Fiber is due. Its accuracy is highly dependent on current plugins' handling times, but cursory testing showed it to generally be within 50ms.