slideshow: log timing info
This commit is contained in:
parent
312410eaf3
commit
c1f6050938
|
@ -21,6 +21,8 @@
|
||||||
;; Needed for browsing
|
;; Needed for browsing
|
||||||
(define original-security-guard (current-security-guard))
|
(define original-security-guard (current-security-guard))
|
||||||
(define orig-err-string-handler (error-value->string-handler))
|
(define orig-err-string-handler (error-value->string-handler))
|
||||||
|
|
||||||
|
(define-logger slideshow)
|
||||||
|
|
||||||
(define-unit viewer@
|
(define-unit viewer@
|
||||||
(import (prefix config: cmdline^) core^)
|
(import (prefix config: cmdline^) core^)
|
||||||
|
@ -872,6 +874,7 @@
|
||||||
|
|
||||||
(define/public (redraw)
|
(define/public (redraw)
|
||||||
(unless printing?
|
(unless printing?
|
||||||
|
(define now (current-milliseconds))
|
||||||
(reset-display-inset! (sliderec-inset (talk-list-ref current-page)) (get-dc))
|
(reset-display-inset! (sliderec-inset (talk-list-ref current-page)) (get-dc))
|
||||||
(send commentary lock #f)
|
(send commentary lock #f)
|
||||||
(send commentary begin-edit-sequence)
|
(send commentary begin-edit-sequence)
|
||||||
|
@ -894,11 +897,13 @@
|
||||||
(when (sliderec-timeout (talk-list-ref current-page))
|
(when (sliderec-timeout (talk-list-ref current-page))
|
||||||
(let ([key (gensym)])
|
(let ([key (gensym)])
|
||||||
(set! current-timeout-key key)
|
(set! current-timeout-key key)
|
||||||
|
(define interval
|
||||||
|
(inexact->exact
|
||||||
|
(floor
|
||||||
|
(* (sliderec-timeout (talk-list-ref current-page))
|
||||||
|
1000))))
|
||||||
(new timer%
|
(new timer%
|
||||||
[interval (inexact->exact
|
[interval interval]
|
||||||
(floor
|
|
||||||
(* (sliderec-timeout (talk-list-ref current-page))
|
|
||||||
1000)))]
|
|
||||||
[just-once? #t]
|
[just-once? #t]
|
||||||
[notify-callback
|
[notify-callback
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
@ -907,6 +912,9 @@
|
||||||
(queue-callback
|
(queue-callback
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(when (send f is-shown?)
|
(when (send f is-shown?)
|
||||||
|
(log-slideshow-debug "Timeout vs. requested: ~s vs. ~s"
|
||||||
|
(- (current-milliseconds) now)
|
||||||
|
interval)
|
||||||
(send c-frame next-one)))
|
(send c-frame next-one)))
|
||||||
#f)))])))
|
#f)))])))
|
||||||
(cond
|
(cond
|
||||||
|
@ -937,7 +945,9 @@
|
||||||
(paint-slide this dc))])
|
(paint-slide this dc))])
|
||||||
(show-spotlight (get-dc))
|
(show-spotlight (get-dc))
|
||||||
(show-time (get-dc))
|
(show-time (get-dc))
|
||||||
(swap-interactives! old-interactives interactives)))
|
(swap-interactives! old-interactives interactives)
|
||||||
|
(log-slideshow-debug "Redraw time: ~s"
|
||||||
|
(- (current-milliseconds) now))))
|
||||||
|
|
||||||
(define interactive-state (make-hash))
|
(define interactive-state (make-hash))
|
||||||
(define/private (swap-interactives! old new-i)
|
(define/private (swap-interactives! old new-i)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user