Back: DeferredVariableBinding-storing Up: Base classes Forward: Delay class-instance creation   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.60 Delay

Defined in namespace Smalltalk
Superclass: Object
Category: Kernel-Processes
I am the ultimate agent for frustration in the world. I cause things to wait (sometimes much more than is appropriate, but it is those losing operating systems' fault). When a process sends one of my instances a wait message, that process goes to sleep for the interval specified when the instance was created.

1.60.1 Delay class: instance creation  (class)
1.60.2 Delay class: timer process  (class)
1.60.3 Delay: accessing  (instance)
1.60.4 Delay: comparing  (instance)
1.60.5 Delay: delaying  (instance)
1.60.6 Delay: initialization  (instance)
1.60.7 Delay: instance creation  (instance)


1.60.1 Delay class: instance creation

forMilliseconds: millisecondCount
Answer a Delay waiting for millisecondCount milliseconds

forSeconds: secondCount
Answer a Delay waiting for secondCount seconds

untilMilliseconds: millisecondCount
Answer a Delay waiting for millisecondCount milliseconds after startup


1.60.2 Delay class: timer process

handleDelayEvent
Handle a timer event; which can be either: - a schedule or unschedule request (DelayEvent notNil) - a timer signal (not explicitly specified) We check for timer expiry every time we get a signal.

runDelayProcess
Run the timer event loop.

scheduleDelay: aDelay on: aSemaphore
Private - Schedule this Delay. Run in the timer process, which is the only one that manipulates Queue.

startDelayLoop
Start the timer event loop.

unscheduleDelay: aDelay
Private. Unschedule this Delay. Run in the timer process, which is the only one that manipulates Queue.


1.60.3 Delay: accessing

delayDuration
Answer the time I have left to wait, in milliseconds.

resumptionTime
Answer `resumptionTime'.


1.60.4 Delay: comparing

= aDelay
Answer whether the receiver and aDelay denote the same delay

hash
Answer an hash value for the receiver


1.60.5 Delay: delaying

wait
Schedule this Delay and wait on it. The current process will be suspended for the amount of time specified when this Delay was created.


1.60.6 Delay: initialization

initForMilliseconds: value
Initialize a Delay waiting for millisecondCount milliseconds


1.60.7 Delay: instance creation

initUntilMilliseconds: value
Initialize a Delay waiting for millisecondCount milliseconds after startup



Back: Delay-initialization Up: Delay Forward: DelayedAdaptor   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on July, 23 2009 using texi2html