How to compare time between the start of main() and finish?

How do you compare the time between the beginning and the end of the main loop? So for example the time would be .02 seconds, or 20 mileseconds it doesn’t matter to me. I just need very accurate time.

Another question, as this is a way I can find it: In c++, how do you change a variable of type “auto” to a string? I need to test the time between two

You could create a timer as follows:

vex::timer::timer myTimer();

And then, myTimer.time() will return the number of milliseconds since the timer was created.

2 Likes

The artical has integers, but this should work for most data types

1 Like