motion design study time as optimization

working on a motion study and want to optimize the design using time for the motor to complete a task as the variable. Any idea how to read time as a sensor? Thanks!

Marcus

SolidworksSimulation