CPU constant

From RoboWiki
Jump to: navigation, search

The CPU constant is the maximum amount of time a robot is allowed per turn, in nanoseconds. It depends on CPU speed, and it is calculated based on the time of various Math methods. Its purpose is to compensate for different computers having different performance characteristics, and to limit robots to the same amount of calculations on all systems. Generally, it will be between 4000000 ns (4 ms) and 8000000 ns (8 ms).

The CPU constant can be recalculated with Options -> Recalculate CPU constant. The new constant will be displayed and logged to the console.

If a robot's execution time exceeds the CPU constant, it will skip a turn.

Screenshots

RecalculateCPUConstant.png

Personal tools