Bug 155374

Summary: [patch] grdc(6) timing loop still broken
Product: Base System Reporter: Andy Farkas <chuzzwassa>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me CC: anatoly.borodin, andyf
Priority: Normal Keywords: patch
Version: 8.2-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Andy Farkas 2011-03-08 12:40:09 UTC
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.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:59:46 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

Do
- Set Status to "Open"
Comment 2 Andy Farkas 2021-12-11 23:27:55 UTC
10 years on... scrolling still doesn't work. I'll admit I havn't looked at it for about the same amount of time so...

Perhaps an easier solution is to just remove the -s flag?

...or will I just close this bug because it'll never get looked at?

-andyf
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:40:02 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>