Git Product home page Git Product logo

scheduler's Introduction

Scheduler

The time based musical event scheduler for Common Lisp

require:

timestamp:

Scheduler's timestamp using UNIX-time(since 1970.1.1) on all platform.

usage:

(in-package :scheduler)

(defvar *scheduler* (make-instance 'scheduler :ahead ..)) ;make scheduler object

(sched-run *scheduler*) ;start scheduler

(sched-add *scheduler* (+ 4 (sched-time *scheduler*)) #'task-function args...) ;insert task to scheduer queue with time

(sched-clear *scheduler*) ;clear to scheduler queue

(sched-stop *scheduler*) ;stop scheduler
Remember! scheduler have 'ahead time'.

what is 'ahead time'? please read this document(http://impromptu.moso.com.au/tutorials/time.html).
summary

 If you are executing a call to evaluate a note (now) by the time the code is evaluated it will already be late.
 You should always try to schedule your code execution ahead of the scheduled time of your tasks.

default 'ahead time' is 0.3 seconds. so this codes are execute after 3.7 seconds.

(sched-add *scheduler* (+ 4 (sched-time *scheduler*)) #'task-function args...)

You can get/set to ahead value of scheduler object by #'ahead accessor.

scheduler's People

Contributors

byulparan avatar alex-free avatar

Stargazers

Kilian M. Haemmerle avatar Gene avatar NCM avatar Johannes Martinez Calzada avatar Zhao Shenyang avatar johann bestowrous avatar Łukasz Korecki avatar David Chkhikvadze avatar

Watchers

 avatar James Cloos avatar  avatar

scheduler's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.