22 lines
639 B
Scheme
22 lines
639 B
Scheme
(require (lib "mztake.ss" "mztake" )
|
|
(lib "match.ss")
|
|
(lib "more-useful-code.ss" "mztake" "private" ))
|
|
|
|
(set-main! "picture.ss")
|
|
|
|
(define (hash-table-increment! h k)
|
|
(let ([old (hash-get h k (lambda () 0))])
|
|
(hash-put! h k (add1 old))))
|
|
|
|
(define pings (make-hash 'equal))
|
|
|
|
((changes where)
|
|
. ==> . (match-lambda [(line function context rest ...)
|
|
(hash-table-increment! pings (list function context))]
|
|
[_ (void)]))
|
|
|
|
(define clicks (changes (quotient milliseconds 50)))
|
|
|
|
(set-running-e! (merge-e (clicks . -=> . false)
|
|
(clicks . -=> . true)))
|