clock_scheduler   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/scheduler.xtm

Implementation

(bind-func clock_scheduler
  (lambda (hz:double)
    (let ((evtlist:SchedEvt{double}* null)
          (ft:[void,double]* null)
          (scheduler:[i64,double]* null)
          (running:i64 1)
          (time 0.0)
          (err 0)
          (i (/ 1.0 hz))
          (f (lambda ()
              (spawn (lambda ()
                        (set! scheduler (scheduler_init evtlist ft))
                        (set! time (clock_clock))
                        (while (> running 0)
                          (scheduler time)
                          (while (< (clock_clock) time) (thread_sleep 0 100000))
                          (set! time (+ time i))
                          void)
                        (println "exiting scheduler")))
              void)))
      (f)
      f)))


Back to Index

Similar Entries

  • -clock:metro-from-host-    scheme
  • -clock:metro-from-host-    scheme
  • arrows_clockspin_heads    xtlang
  • beat_scheduler    xtlang
  • clock->samples    scheme
  • clock-client-receive    scheme
  • clock-runsync    scheme
  • clock-server-receive    scheme
  • clock-set-bpm    scheme
  • clock-set-cycle    scheme
  • clock:offset-from-server    scheme
  • clock:sync-adjust    scheme
  • clock:update-metro    scheme
  • clock:update-metro    scheme
  • clock_scheduler_main_callback    xtlang
  • clock_test_a    xtlang
  • clock_test_b    xtlang
  • get_midi_evt_clocktime    xtlang
  • join-clock-time    scheme
  • samples->clock    scheme
  • scheduler_at    xtlang
  • scheduler_evt    xtlang
  • scheduler_init    xtlang
  • split-clock-time    scheme
  • start_midi_scheduler    xtlang
  • topclock-bpm    scheme
  • topclock-election    scheme
  • topclock-receive    scheme
  • topclock-streamer    scheme
  • topclock-sync    scheme
  • topclock-variable    scheme
  • toplap-clock-election    scheme
  • toplap-clock-sync    scheme