Class TimerService

  • All Implemented Interfaces:

    
    public class TimerService
    
                        

    Manages logic related to timers and pauses

    Since:

    3.2

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static TimerService getInstance()
      long adjustDelay(long initialDelay) Adjust delay so that initialDelay does not exceed end of test
      long adjustDelay(long initialDelay, boolean runTillEnd) Adjust delay so that initialDelay does not exceed end of test If runTillEnd is false 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 test
      long adjustDelay(long initialDelay, long endTime, boolean runTillEnd) Adjust delay so that initialDelay does not exceed end of test If runTillEnd is false the delay will be shortened to -1 if the delay would be longer than the remaining run time.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • adjustDelay

         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

         long adjustDelay(long initialDelay, boolean runTillEnd)

        Adjust delay so that initialDelay does not exceed end of test If runTillEnd is false the delay will be shortened to -1 if the delay would be longer than the remaining run time.

        Parameters:
        initialDelay - initial delay in milliseconds
        runTillEnd - adjust delay to match the scheduled end
        Returns:

        initialDelay or adjusted delay

      • adjustDelay

         long adjustDelay(long initialDelay, long endTime)

        Adjust delay so that initialDelay does not exceed end of test

        Parameters:
        initialDelay - initial delay in milliseconds
        endTime - End time of JMeterThread
        Returns:

        initialDelay or a shortened delay if delay is longer than the test is scheduled

      • adjustDelay

         long adjustDelay(long initialDelay, long endTime, boolean runTillEnd)

        Adjust delay so that initialDelay does not exceed end of test If runTillEnd is false the delay will be shortened to -1 if the delay would be longer than the remaining run time.

        Parameters:
        initialDelay - initial delay in milliseconds
        endTime - End time of JMeterThread
        runTillEnd - adjust delay to match the scheduled end
        Returns:

        initialDelay or a shortened delay if delay is longer than the test is scheduled