clock:offset-from-server   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/scheme.xtm

Implementation

(define clock:offset-from-server
   (lambda (server-proc local-proc)
      (let* ((t1 (clock:clock))
       (t2 (ipc:call server-proc local-proc 'clock:clock))
       (t3 t2)
       (t4 (clock:clock))
       (msg-delay (- (- t4 t1) (- t2 t3)))
       (time-offset (/ (+ (- t2 t1) (- t3 t4)) 2)))
   time-offset)))


Back to Index