After adding a small delay loop to the scrolling code of grdc(6) I noticed
that it was not keeping time properly.
This patch adds a delay during scrolling so that you can actually see it,
and also corrects the timing calculations within the do() loop.
The scrolling bit is trivial, see my followup to bin/151663.
The main thrust of this patch is to finally fix the timing of the do() loop:
1/ at the start of the loop we get the current time (now).
2/ we diplay the time, which may take some time, especially if scrolling.
3/ after display we get the time again (delay).
4/ we then calculate the amount of time needed to wait until a whole second has passed (wait).
Fix: patch (including scrolling patch):
How-To-Repeat: Add a delay during scrolling and notice how the time is displayed wrong.
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017
- Set Status to "Open"