grdc(6): Improve scrolling timestamp precisions
authorAaron LI <aly@aaronly.me>
Sun, 21 Feb 2021 07:48:46 +0000 (15:48 +0800)
committerAaron LI <aly@aaronly.me>
Sun, 21 Feb 2021 07:52:13 +0000 (15:52 +0800)
commit6159ff08e48698c1e9482f2b02adc457b88d4d71
tree8d15ebf762d3dad3d98f156c4dd2ed9b46f26d5a
parent8f2695f272807c488393d73a919c4affb3b4cf49
grdc(6): Improve scrolling timestamp precisions

Use clock_gettime() to obtain the current time with higher precision,
which is used to improve the scrolling timestamp, trying to make the
scrolling end on the integral seconds.

Inspired by OpenBSD's implementation.
games/grdc/grdc.c