start_timer()
Features
This is a command to measure the execution time of the simulation program of the controller. When used with the end_timer() command, it returns the execution time of the script between the two functions.
Caution
This function is for measuring motion execution time in Windows environment and Linux environment. When measuring in Real mode in an emulator (virtual controller) environment, incorrect values may be returned.
Return
Value | Description |
---|---|
0 | Success |
Negative value | Error |
Example
start_timer()
wait(1)
t= end_timer()
tp_log("tttt={0} sec".format(t))