sourcebots / robot-api

(Legacy) API to interface with robotd
http://docs.sourcebots.co.uk/api/
MIT License
4 stars 1 forks source link

Replace thread killing with SIGALRM #100

Closed RealOrangeOne closed 6 years ago

RealOrangeOne commented 6 years ago

Rather then using the system clock, which has issues with the Pis CPU changing its clock speed. This implementation using SIGALRM, which doesn't have this issue:

SIGALRM is sent when real or clock time elapses

https://en.wikipedia.org/wiki/Signal_(IPC)#SIGALRM