This group of functions covers VSE capability to work with timers, internal routines that repeatedly measure a timing interval between different events.
VSE Time Object
VSE time object presents time intervals in verification scripts. The verification script time object is a "list" object of two elements.
[seconds, nanoseconds]
Note: The best way to construct a VSE time object is to use the Time() function.
SetTimer()
Starts a timing calculation from the event at which it was called.
SendTimer(timer_id = 0)
|
Parameters |
|
|---|---|
|
timer_id |
Unique timer identifier. |
Example
SetTimer(); # Start timing for timer with id = 0.
SetTimer(23); # Start timing for timer with id = 23.
Remarks
If this function is called a second time for the same timer ID, it resets the timer and starts timing the calculation again from the point where it was called.
KillTimer()
Stops a timing calculation for a specific timer and frees related resources.
KillTimer(timer_id = 0)
|
Parameters |
|
|---|---|
|
timer_id |
Unique timer identifier. |
Example
KillTimer(); # Stop timing for timer with id = 0.
KillTimer(23); # Stop timing for timer with id = 23.
GetTimerTime()
Retrieves a timing interval from the specific timer.
GetTimerTime (timer_id = 0)
|
Parameters |
|
|---|---|
|
timer_id |
Unique timer identifier. |
Return values
Returns a VSE time object from a timer with id = timer_id.
Example
GetTimerTime (); # Retrieve timing interval for timer with id = 0.
GetTimerTime (23); # Retrieve timing interval for timer with id = 23.
Remarks
When called, this function does not reset the timer.