1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
<html><head><title>File too/Timer</title></head>
<body BGCOLOR="#ffffff" TEXT="#000000" LINK="#000000" VLINK="#000000">
<h1>File too/Timer</h1>
<hr><h2>class <a href="index.html">too</a>.<a name="Timer" href="#i_Timer">Timer</a></h2>
Instances of the <b><code><a href="Timer.html#Timer">Timer</a></b></code> class provide, in conjunction with the
<b><code><a href="RunLoop.html#RunLoop">RunLoop</a></b></code>, event scheduling functionality. <b><code><a href="Timer.html#Timer">Timer</a></b></code> objects can fire
once or repeatedly.
<p> Because the trigger time of a <b><code><a href="Timer.html#Timer">Timer</a></b></code> can change, in case of repeated
firing, a <b><code><a href="Timer.html#Timer">Timer</a></b></code> is not a <b><code><a href="../tom/index.html">tom</a>.<a href="../tom/Date.html#Date">Date</a></b></code>: a <b><code><a href="Timer.html#Timer">Timer</a></b></code> represents a moment in
time like a <b><code><a href="../tom/index.html">tom</a>.<a href="../tom/Date.html#Date">Date</a></b></code>, but a <b><code><a href="../tom/index.html">tom</a>.<a href="../tom/Date.html#Date">Date</a></b></code> is assumed to be constant.
<h3>Inherits</h3>
<dl>
<dt>State supers
<dd><a href="../tom/index.html">tom</a>.<a href="../tom/HeapElement.html#HeapElement">HeapElement</a>
</dl>
<h3>methods</h3>
<dl><dt><b><pre>instance (id)
withInterval double secs
invocation <a href="../tom/index.html">tom</a>.<a href="../tom/Invocation.html#Invocation">Invocation</a> invocation
repeats: boolean repeats_p = NO
pre
secs > 0.0 || !repeats_p && !secs;
</pre></b><dd>
Undocumented.
<p></dl><h2>instance <a href="index.html">too</a>.<a name="i_Timer" href="#Timer">Timer</a></h2>
<h3>variables</h3>
<dl>
<dt><b><code>
public double fire_time;</code></b>
<dd>The next (relative) moment in time we will fire.
<dt><b><code>
public double period;</code></b>
<dd>The repetition period. This is 0.0 for a single-shot timer.
<dt><b><code>
<a href="../tom/index.html">tom</a>.<a href="../tom/Invocation.html#Invocation">Invocation</a> invocation;</code></b>
<dd>The invocation to fire when we do.
</dl>
<h3>methods</h3>
<dl><dt><b><pre>id (self)
initWithFireTime double d
invocation <a href="../tom/index.html">tom</a>.<a href="../tom/Invocation.html#Invocation">Invocation</a> i
period: double p = 0.0
pre
p >= 0.0;
</pre></b><dd>
Designated initializer. If the time <code>d</code> lies in the past, the timer
will fire as soon as possible.
<p><dt><b><pre>void
fire;
</pre></b><dd>
Undocumented.
<p><dt><b><pre><a href="../tom/index.html">tom</a>.<a href="../tom/streams.html#OutputStream">OutputStream</a> (s)
writeFields <a href="../tom/index.html">tom</a>.<a href="../tom/streams.html#OutputStream">OutputStream</a> s;
</pre></b><dd>
Undocumented.
<p><dt><b><pre>void
cancel
pre
[self scheduled];
</pre></b><dd>
Cancel this timer with the current <b><code><a href="RunLoop.html#RunLoop">RunLoop</a></b></code>. It must be scheduled
with that <b><code><a href="RunLoop.html#RunLoop">RunLoop</a></b></code>.
<p><dt><b><pre>void
schedule
pre
![self scheduled];
</pre></b><dd>
Schedule this timer with the current <b><code><a href="RunLoop.html#RunLoop">RunLoop</a></b></code>. The timer may not
already be scheduled.
<p><dt><b><pre>boolean
scheduled;
</pre></b><dd>
Return whether this timer is currently scheduled.
<p><dt><b><pre>int
compare id other;
</pre></b><dd>
<h4>Comparable</h4>
<p></dl><hr><address>Generated by tm 1.01.</address></body></html>
|