fta/slideshow/private/timer-factory.ss
(module timer-factory (lib "frtime.ss" "fta" "slideshow" "private" "frtime")
  (require (lib "etc.ss" "fta" "slideshow" "private" "frtime"))
  
  (define (get-new-time loading-slide current-page-b)
    (rec x
      (until 0
             (if (= loading-slide current-page-b)
                 (- milliseconds (value-now milliseconds))
                 (delay-by x 0)))))
  
  (define (get-new-beh loading-slide current-page-b beh)
    (rec x
      (until 0
             (if (= loading-slide current-page-b)
                 beh
                 (delay-by x 0)))))
  
  (define (filter-events loading-slide current-page-b evs)
    (filter-e (lambda (x) (= loading-slide current-page-b))
              evs))
  
  
  (provide get-new-time
           get-new-beh
           filter-events))