I want to get code execution time and code execution time limitations in the code , If time not permitting, another code will not be executed.
I want to get code execution time and code execution time limitations in the code , If time not permitting, another code will not be executed.
In general, you can't but the watchdog timer will trigger if you run too long.
The exception is with watch faces, where in the sim, under File, there is "view watch face diagnostics", that will give you info on things like your execution time in onPartialUpdate() to help you keep under the 30ms avg execution times.
You can use Sys.getSystemTimer() and insert it into your code to get info on specific sections of code though, but using something like Sys.printlin can infuence it, so you want to collect the info and print it when you're done.
I can't find .getSystemTimer() within System.
Did you mean .getTimer()? Or something else?
Doc says there are:
Write an error to the console and exit the system.
End execution of the current app.
Exit the current app and launch a new app.
Get the current clock time.
Get the current device settings.
Get the current system stats.
Get the current millisecond timer value.
Check the installation status of an app.
Print to the console.
Print to the console with a line terminator.