This action creates a new Time Source, and stores it in the Target variable. Read Time Sources for an overview.
This is based on the time_source_create() function. Read its page for detailed information on the arguments.
You need to use Start Time Source to activate a Time Source after it's created.
You must destroy a Time Source using Destroy Time Source when you no longer need it.
Argument | Description |
---|---|
Target | The variable where the new Time Source will be stored |
Parent | The parent Time Source: either a built-in Time Source or a custom one |
Period | The period length of the Time Source, how long it takes to expire |
Units | The units that the period is expressed in (seconds or frames) |
Callback | The method or script function to call when the Time Source expires |
Arguments | OPTIONAL An array containing the arguments to pass into the callback function |
Repetitions | OPTIONAL How many times the Time Source should run in total, or -1 for indefinite repetition |
Expiry Type | OPTIONAL The expiry type for the Time Source |
This code block does the following:
This Time Source will execute its callback every second, printing "A second has passed!" to the Output Log.