How to keep track of time (in milliseconds)

I’m trying to track how long my program takes to run (the time for each step in milliseconds). I’m an experienced coder but I don’t know a lot about c++ that isn’t vex-related. Can anyone help me out?

If im not mistaken the controller itself has a timer when you run a program.

Try

vex::brain.timer

Function

Returns: double

Overloads:

timer(timeUnits units)

Description

Gets the value of the timer in the units specified.

Parameters:

Name Type Description
units vex::timeUnits The unit of time that will be returned.
4 Likes

Check out the timer class for vexCode

1 Like

thanks for the help!

1 Like