This function is used to measure the duration of a software loop.
Syntax |
real loop_time () |
---|---|
Result |
Returns the time [ms] elapsed between two successive executions of the same function |
Validity |
Rule, Task |
Note |
The first time it is executed, the function returns 0 and stores the current time. In case loop_time() is used in a user R3 function, it calculates the time between function calls |
Each loop_time() function has its own runtime memory. The duration calculation is the difference between the current time and the memory related to the single function call.
Example of use:
|