Package org.apache.jmeter.timers
Class TimerService
java.lang.Object
org.apache.jmeter.timers.TimerService
Manages logic related to timers and pauses
- Since:
- 3.2
-
Method Summary
Modifier and TypeMethodDescriptionlong
adjustDelay
(long initialDelay) Adjust delay so that initialDelay does not exceed end of testlong
adjustDelay
(long initialDelay, boolean runTillEnd) Adjust delay so that initialDelay does not exceed end of test
IfrunTillEnd
isfalse
the delay will be shortened to-1
if the delay would be longer than the remaining run time.long
adjustDelay
(long initialDelay, long endTime) Adjust delay so that initialDelay does not exceed end of testlong
adjustDelay
(long initialDelay, long endTime, boolean runTillEnd) Adjust delay so that initialDelay does not exceed end of test
IfrunTillEnd
isfalse
the delay will be shortened to-1
if the delay would be longer than the remaining run time.static TimerService
-
Method Details
-
getInstance
- Returns:
- ScriptEngineManager singleton
-
adjustDelay
public long adjustDelay(long initialDelay) Adjust delay so that initialDelay does not exceed end of test- Parameters:
initialDelay
- initial delay in milliseconds- Returns:
- initialDelay or adjusted delay
-
adjustDelay
public long adjustDelay(long initialDelay, boolean runTillEnd) Adjust delay so that initialDelay does not exceed end of test
IfrunTillEnd
isfalse
the delay will be shortened to-1
if the delay would be longer than the remaining run time.- Parameters:
initialDelay
- initial delay in millisecondsrunTillEnd
- adjust delay to match the scheduled end- Returns:
- initialDelay or adjusted delay
-
adjustDelay
public long adjustDelay(long initialDelay, long endTime) Adjust delay so that initialDelay does not exceed end of test- Parameters:
initialDelay
- initial delay in millisecondsendTime
- End time of JMeterThread- Returns:
- initialDelay or a shortened delay if delay is longer than the test is scheduled
-
adjustDelay
public long adjustDelay(long initialDelay, long endTime, boolean runTillEnd) Adjust delay so that initialDelay does not exceed end of test
IfrunTillEnd
isfalse
the delay will be shortened to-1
if the delay would be longer than the remaining run time.- Parameters:
initialDelay
- initial delay in millisecondsendTime
- End time of JMeterThreadrunTillEnd
- adjust delay to match the scheduled end- Returns:
- initialDelay or a shortened delay if delay is longer than the test is scheduled
-