Timer (sysline)
Dan Bernstein
brnstnd at kramden.acf.nyu.edu
Mon Mar 18 22:22:14 AEST 1991
In article <668979251.11500 at mindcraft.com> karish at mindcraft.com (Chuck Karish) writes:
> Unless sysline is using hardware status
> line capabilities, the data it prints out scrolls with the rest of the
> text on the screen. Users of terminals without status line capability
> would have to use an emulator program (perhaps based on curses) to
> manage all screen output.
But VT-compatible terminals (perhaps the majority of terminals in use)
can just change their scrolling region with ^[[1;24r (for example).
> >my first real (!"hello world") program was a clock; it used curses to
> >go to the status line, read the current time, printed it, then slept
> >for a settable interval. after tuning it, i got it down to *1*
> >cpu-second per 8-hour day, updating every 15 seconds!
> Congratulations. You re-invented a small part of the sysline
> program.
Nothing wrong with that. Many vendors ship (or, at least, used to ship)
versions of sysline that would completely misinterpret termcap delay
sequences, and sysline isn't particularly fast or careful about output
flushing or extensible or configurable, but even if it were perfect
there wouldn't be anything wrong with people cloning it to learn about
UNIX.
---Dan
More information about the Comp.unix.programmer
mailing list