On Wed, Oct 03, 2001 at 01:11:26PM -0500, Cederik De Leon A wrote:
> Dear Listears: :)
>
> I'm writing a little program for Kids for the national science divulgation
> encounter. My Q: is the next. i have a little screen with fields and some
> data, in the left-hand TOP corner i have a little clock. How i can make the
> continuous clock update and at the same time wait for a kbd instruction.
>
I use alarm() for a similar thing. just set up a signal handler that catches
SIGALRM, redraws the clock, and calls alarm(1) to update the clock once a
second. alarm(60) will update it once a minute.
then, at the beginning of the program, just call alarm(60) once and away
you go. if you ever need to turn off the clock update, just do alarm(0).
pretty simple.
--
Jason
------------------------------------------------------------------
Unsubscribe: To: [EMAIL PROTECTED]
Body: unsubscribe linux-svgalib