Timer (sysline)

Timer (sysline)

Post by Peter Miel » Wed, 13 Mar 1991 02:31:24





> :Does anybody know how to write a proper background timer program that
> :displays the current time on the upper-right corner of screen like
> :exists in DOS ?

> How about lower corner?  Use sysline.

Why restrict him to the lower corner, one can also place it in the
upper corner as well (just change the terminal description entry).
--

Dictionary of Old English Project               utgpu!utzoo!utdoe!peter
University of Toronto
 
 
 

Timer (sysline)

Post by andrew.d.h » Fri, 15 Mar 1991 20:52:54


"


"> :Does anybody know how to write a proper background timer program that
"> :displays the current time on the upper-right corner of screen like
"> :exists in DOS ?
">
"> How about lower corner?  Use sysline.
"
"Why restrict him to the lower corner, one can also place it in the
"upper corner as well (just change the terminal description entry).

why cut the screen down when you already have a ststus line?

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!

--
Andrew Hay              +------------------------------------------------------+
Ragged Individualist    |                       JAAAAAAANE!                    |
AT&T-BL Ward Hill MA        |           HOW DO YOU STOP THIS CRAZY THING?          |


 
 
 

Timer (sysline)

Post by Chuck Kari » Sat, 16 Mar 1991 04:34:10



(andrew.d.hay) writes:

>(Peter Mielke) writes:



>"> :Does anybody know how to write a proper background timer program that
>"> :displays the current time on the upper-right corner of screen like
>"> :exists in DOS ?
>">
>"> How about lower corner?  Use sysline.
>"
>"Why restrict him to the lower corner, one can also place it in the
>"upper corner as well (just change the terminal description entry).

In general, this doesn't work.  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.

Quote:>why cut the screen down when you already have a ststus line?

sysline is designed to use the status line.

Quote:>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.


        Mindcraft, Inc.         (415) 323-9000

 
 
 

Timer (sysline)

Post by Dan Bernste » Tue, 19 Mar 1991 21:22:14



> 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).

Quote:> >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