TK timer support??

From: Harvey J. Stein <hjstein_at_MATH.HUJI.AC.IL>
Date: Tue, 27 Jun 1995 23:48:35 +0300

"John A. Zinky" writes:
> Does STK support the TK timer events?
> I would like to have a scheme function called after every n milliseconds.
> Tk has the functions: (Ousterhout pp.394)
> TK_CreateTimerHandler binds a C function to timer handler
> TK_DelateTimerHandler Cancels timer?

You can use after. For example,

(after 300 '(display "hi\n"))

will return immediately, and display "hi" in 300 milliseconds. If you
want something to run every 300 milliseconds, you might do something

(define (foo)
   (after 300 '(foo))
   (display "hi\n"))



will cause "hi" to be displayed every 300 milliseconds. I use this
technique in stetris.

Dr. Harvey J. Stein
Berger Financial Research
Received on Tue Jun 27 1995 - 22:51:28 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST