1 18 19 package org.apache.jmeter.timers; 20 21 import java.io.Serializable ; 22 23 import org.apache.jmeter.engine.event.LoopIterationEvent; 24 import org.apache.jmeter.engine.event.LoopIterationListener; 25 import org.apache.jmeter.testelement.AbstractTestElement; 26 import org.apache.jmeter.util.JMeterUtils; 27 28 36 public class ConstantTimer 37 extends AbstractTestElement 38 implements Timer, Serializable , LoopIterationListener 39 { 40 41 public final static String DELAY = "ConstantTimer.delay"; 42 private long delay = 0; 43 44 47 public ConstantTimer() 48 { 49 } 50 51 55 public void setDelay(String delay) 56 { 57 setProperty(DELAY, delay); 58 } 59 60 64 public void setRange(double range) 65 { 66 } 67 68 73 public String getDelay() 74 { 75 return getPropertyAsString(DELAY); 76 } 77 78 83 public double getRange() 84 { 85 return (double) 0; 86 } 87 88 93 public long delay() 94 { 95 return delay; 96 } 97 98 103 public String toString() 104 { 105 return JMeterUtils.getResString("constant_timer_memo"); 106 } 107 108 113 public void iterationStart(LoopIterationEvent event) 114 { 115 delay = getPropertyAsLong(DELAY); 116 117 } 118 119 130 131 } 132 | Popular Tags |