On Mon, Aug 24, 2015 at 7:29 PM, Rafael Zalamena <[email protected]> wrote: > Following the worm(6) bug fix and improvement, make robots(6) do it as > well. > > Changes: > * Replace timeval with timespec structs; > * Use clock_gettime(CLOCK_UPTIME) instead of gettimeofday(); > * Use timespec*() instead of manual math operations; > * Use ppoll() instead of poll() + math operations; > > No functionality changed, except that with this diff robots(6) won't > suffer with clock changes and suspend.
I would just use CLOCK_MONOTONIC, as it's portable. The difference is that if you suspend right after moving, it won't immediately advance on resume but rather give you rest of your 3 seconds. Condemning someone to a "pass" move just because they suspended when they closed their laptop when their boss walked by or when they left the meeting they were playing robots in seems...harsh. Otherwise, ok guenther@
