Environment: Siren
Instances of ConditionalDuration are duration times where the value is a block.
See the class examples.
updating
accessing
Answer the result of passing the argument to the receiver's block.
wait
Cycle the receiver until the argument fulfills the receiver's block.
waitUntil: anArg
Cycle the receiver until the argument fulfills the receiver's block.
private
Answer Duration.
converting
It is an error to try this here--we implement what's ok for CDs
arithmetic
Answer that it is an error to attempt arithmetic with this magnitude.
+ aDuration
Answer the sum of the receiver and the argument--the composition of two blocks
- aValue
Answer that it is an error to attempt arithmetic with this magnitude.
/ aValue
Answer that it is an error to attempt arithmetic with this magnitude.
MetaClass: ConditionalDuration class
instance creation
Answer a new conditional duration whose value is the given block
randomBetween: lo and: hi
Answer a new conditional duration whose value is between lo and hi (given in seconds)
until: boolBlock
Answer a new conditional duration whose value is the given block
examples
Print a simple message to the transcript demonstrating the various types.
exampleWithRands
Demonstrate the random duration