setSpeedRatio()
Adjust the pace of ggc.wait(delay)
commands.
Syntax
setSpeedRatio(
speedRatio FLOAT )
RETURNS FLOAT
- setSpeedRatio is the ratio used to adjust the pace of
ggc.wait(delay)
commands. Setting a speed ratio allows you to speed up or slow down the pace of the test execution.
Usage
Call this method to adjust the pace of ggc.wait(delay)
commands. The wait delay
causes the GGC to wait the specified number of milliseconds before executing the next instruction,
and the speed ratio further adjusts the duration of that delay.
The default ratio is 1, which does not affect the wait delay. A wait delay of 10 milliseconds remains 10 milliseconds.
Any ratio less than 1 will speed up the wait delay. For example, with a ratio of 0.1, a delay of 10 milliseconds becomes 0.1 * 10 = 1 millisecond.
Any ratio greater than 1 will slow down the wait delay. For example, with a ratio of 2, a delay of 10 milliseconds becomes 2 * 10 = 20 milliseconds.
Setting the speed ratio to zero (0) clears the wait delay.
In the following example, the call to the setSpeedRatio command specifies that the delay be adjusted by a ratio of 0.1. As a result, when the wait method sets a delay of 100 milliseconds, the actual duration becomes 100*0.1 milliseconds, or 10 milliseconds, before the GGC calls the next test instruction.
DEFINE ratio FLOAT
LET ratio = ggc.setSpeedRatio(0.1)
CALL ggc.wait(100)
You can also set the speed radio by using the speed-ratio setting in the ggcadmin command starting the BDL scenario server.