[noctool-cvs] CVS web

imattsson imattsson at common-lisp.net
Tue May 13 06:01:38 UTC 2008


Update of /project/noctool/cvsroot/web
In directory clnet:/tmp/cvs-serv12829

Added Files:
	hacking.html 
Log Message:
IM

Initial check-in.



--- /project/noctool/cvsroot/web/hacking.html	2008/05/13 06:01:38	NONE
+++ /project/noctool/cvsroot/web/hacking.html	2008/05/13 06:01:38	1.1
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>The NOCtool project</title>
 <link rel="stylesheet" type="text/css" href="style.css"/>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
</head>

<body>
 <div class="header">
  <h1>Hacking NOCtool</h1>
  <h2>The NOCtool project</h2>
 </div>

<h2>The scheduler</h2>

The scheduler class points to a double-linked queue of
time-slots. These time-slots in turn know when they're supposed to run
and what events that need to be run at that time.

Adding an event to a scheduler is a two-fold process. First find (or
create) the time-slot that corresponds to the time we want to run a
specific event, then push the event onto the scheduler.

The way any event is being run is by having the generic function
PROCESS called with the event as argument. In general, events are
monitor objects.

The scheduler API is fairly limited, consisting of the following
functions:
<dl>
<dt>schedule <b>object</b> <b>time</b> <i>&optional scheduler</i>
 <dd>Schedule an event at a given time. Unless specified, this will be
added to the default scheduler.
<dt>next-time <i>&optional scheduler</i>
 <dd>Get the time for the next time-slot. It is unspecified what
happens if this is called with a scheduler that has no events
scheduled. <i>[ probably worth making it return NIL ]</i>
<dt>next-timeslot <i>&optional scheduler</i>
 <dd>Return the next time-slot and remove it from the scheduler.
</dl>






</body>
</html>



More information about the noctool-cvs mailing list