ConstantTimer (Apache JMeter dist API)
Description: declaration: package: org.apache.jmeter.timers, class: ConstantTimer

Package org.apache.jmeter.timers

# Class ConstantTimer

java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.timers.ConstantTimer

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Searchable`, `org.apache.jmeter.testelement.TestElement`, `Timer`

Direct Known Subclasses:
  `RandomTimer`

public class ConstantTimer extends AbstractTestElement implements Timer, Serializable
This class implements a constant timer with its own panel and fields for value update and user interaction.

See Also:
  - Serialized Form

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElement

  `org.apache.jmeter.testelement.TestElement.Companion`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DELAY`

  ### Fields inherited from interface org.apache.jmeter.testelement.TestElement

  `COMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ConstantTimer()`
  No-arg constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `delay()`
  Retrieve the delay to use during test execution.
  `String`
  `getDelay()`
  Get the delay value for display.
  `double`
  `getRange()`
  Retrieve the range (not used for this timer).
  `void`
  `setDelay(String delay)`
  Set the delay for this timer.
  `void`
  `setRange(double range)`
  Set the range (not used for this timer).
  `String`
  `toString()`
  Provide a description of this timer class.

  ### Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

  `addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface org.apache.jmeter.testelement.TestElement

  `get, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getPropertyOrNull, getProps, getSchema, getString, removed, removeProperty, set, set, set, set, set, set, set, set, set`

  ### Methods inherited from interface org.apache.jmeter.timers.Timer

  `isModifiable`

- ## Field Details

  - ### DELAY

    public static final String DELAY
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ConstantTimer

    public ConstantTimer()
    No-arg constructor.

- ## Method Details

  - ### setDelay

    public void setDelay(String delay)
    Set the delay for this timer.
    Parameters:
      `delay` - The delay for this timer

  - ### setRange

    public void setRange(double range)
    Set the range (not used for this timer).
    Parameters:
      `range` - Not used

  - ### getDelay

    public String getDelay()
    Get the delay value for display.
    Returns:
      the delay value for display.

  - ### getRange

    public double getRange()
    Retrieve the range (not used for this timer).
    Returns:
      the range (always zero for this timer).

  - ### delay

    public long delay()
    Retrieve the delay to use during test execution.
    Specified by:
      `delay` in interface `Timer`
    Returns:
      the delay.

  - ### toString

    public String toString()
    Provide a description of this timer class.
    Overrides:
      `toString` in class `Object`
    Returns:
      the description of this timer class.