after
Canonical ID: events.after. Nederlands: na.
Starts the block under when after(...) once its waiting time has passed and the script gets a turn. This is a one-shot timer: it runs once, not repeatedly. All these timers start counting at the same moment after initialization, the ordinary instructions that prepare the program before event scripts run.
Their deadline is the earliest time they may run. Equal deadlines keep the order written in the file. A zero-second timer waits behind started work. Another interactive execution round does not restart a used timer. Reset prepares new timers; Stop, exit, a failure, or closing the session cancels those still waiting.
Signature
when after(seconds):
Arguments
| Parameter | Type | Requirement |
|---|---|---|
seconds |
Number literal | A direct finite literal from 0 through 10; no variable, expression, or unary sign. |
Return value
Event descriptor.
Example
# language: en
when started():
say "A"
when after(0.05):
say "B"
Prints A, then B after the timer becomes ready.
Notes and common mistakes
Use the function name for your source language. Its canonical ID is a shared documentation label; you do not type that ID as a call. Giving your own variable or function the same name can hide the built-in. Supply the documented arguments and value types. Pliro reports mismatches when checking can detect them, or when the call runs.
An event descriptor selects the event in a top-level when header, outside other blocks (E3201–E3203). A reporter is an ordinary function that returns a value, such as pointerX; broadcast is an ordinary call too. A handler is the block reacting to an event. Key and pointer handlers keep a run ready for future input and need host support (E4019). Pointer reporters need the current pointer event (E4020). The whole run has a shared event-work limit (E4018). Ordinary setup must finish before handlers get turns. See event rules and pointer positions.
Related entries
started · messageReceived · keyPressed · pointerPressed · pointerReleased · Programming guides · Host support · Calls and arguments
