Category: Kernel-Processes
Superclass: Object
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.

Method category index

instance creation (class)
still unclassified (class)
timer process (class)
accessing (instance)
comparing (instance)
copying (instance)
delaying (instance)
initialization (instance)
instance creation (instance)
testing (instance)
timeout (instance)

instance creation (class)

forMilliseconds: millisecondCount
Answer a Delay waiting for millisecondCount milliseconds

forNanoseconds: nanosecondCount

Answer a Delay waiting for nanosecondCount nanoseconds

forSeconds: secondCount

Answer a Delay waiting for secondCount seconds

untilMilliseconds: millisecondCount

Answer a Delay waiting until millisecondCount milliseconds after startup

untilNanoseconds: nanosecondCount

Answer a Delay waiting until nanosecondCount nanoseconds after startup

top


still unclassified (class)

update: aspect
Prime the timer event loop when the image starts running.

top


timer process (class)

activeDelay
Return the delay at the head of the queue.

handleDelayRequestor

Handle a timer event; which can be either: - a schedule or unschedule request (DelayRequestor 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

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.

top


accessing (instance)

asAbsolute
Answer a delay that waits until the current delay's resumptionTime, or delayDuration milliseconds from now if that would be nil. May answer the receiver if it is already waiting until an absolute time.

delayDuration

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

isAbsolute

Answer whether the receiver waits until an absolute time on the millisecond clock.

resumptionTime

Answer `resumptionTime'.

top


comparing (instance)

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

hash

Answer an hash value for the receiver

top


copying (instance)

postCopy
Adjust the current delay so that it behaves as if it had just been created.

top


delaying (instance)

timedWaitOn: aSemaphore
Schedule this Delay and wait on it. The current process will be suspended for the amount of time specified when this Delay was created, or until aSemaphore is signaled.

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.

top


initialization (instance)

initForNanoseconds: value
Initialize a Delay waiting for millisecondCount milliseconds

top


instance creation (instance)

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

top


testing (instance)

isActive
Answer whether this Delay is being waited on.

top


timeout (instance)

value: aBlock onTimeoutDo: aTimeoutBlock
Execute aBlock for up to the time of my own delay; in case the code did not finish abort the execution, unwind the block and then evaluate aTimeoutBlock.

top