Skip to main navigation Skip to main content Skip to page footer

Difference between WaitForTime and Sleep commands in ScriptControl

Question

What is the difference between “waitfortime” and “sleep” in ScriptControl?

Solution

The WaitForTime command waits until the simulation time reaches a certain time:

So for example "WaitForTime 10" waits until the simulation time reaches 10s. The simulation time is the time displayed inside CarMaker (see screenshot below)
But the simulation time does not necessarily run the same speed as the actual time! (for example 5x RT means it runs five times faster)

The Sleep command pauses the script for a certain numbers of actual seconds of the computer / wallclock time independent from the simulation time inside CarMaker.

 

Date: 01.08.2023
Product: CarMaker
Version: 12.0
Component: ScriptControl
Language: English

Back to FAQ overview