Timer elements let you run timers and, if used with wait
, pause the execution of the trial’s script for the specified duration.
Creation:
newTimer("myTimer", 1000)
Example:
[js try=”true”]newText(“pleasewait”, “Please wait 1s.”)
.print()
,
newTimer(“wait”, 1000)
.start()
.wait()
,
getText(“pleasewait”)
.remove()
[/js]
The code above adds the text Please wait 1s to the screen, starts a 1000ms timer and waits until it is done before removing the text.
Commands
[yadawiki-list category=”NonTest command,Timer element”]
Tests
[yadawiki-list category=”Test command,Timer element”]
Index
- Tutorial
- Commands by element categories
- Standard Element Commands
- Audio element
- Button element
- Canvas element
- DropDown element
- EyeTracker element
- Function element
- Html element
- Image element
- Key element
- MediaRecorder element
- Scale element
- Selector element
- Text element
- TextInput element
- Timer element
- Tooltip element
- Var element
- Video element
- Youtube element
- Special clear command
- Special end command
- Global PennController Commands
- PennController
- PennController.AddHost
- PennController.AddTable
- PennController.CheckPreloaded
- PennController.Debug
- PennController.DownloadVoiceButton
- PennController.FeedItems
- PennController.Footer
- PennController.GetTable
- PennController.GetURLParameter
- PennController.Header
- PennController.InitiateRecorder
- PennController.PreloadZip
- PennController.ResetPrefix
- PennController.SendResults
- PennController.Sequence
- PennController.SetCounter
- PennController.Template
- Installing PennController
- Ontology
- Aesthetics
- Preloading resources
- ZIPped resources
- Spreadsheet (CSV)
- Canvas creation
- Setup for audio recordings collection