public void recalculate(LoadTestRunner loadTestRunner, LoadTestRunContext context) {
// get time passed since start of test
long timePassed = System.currentTimeMillis() - startTime;
if (loadTestRunner.getStatus() == Status.RUNNING) {
WsdlLoadTest wsdlLoadTest = (WsdlLoadTest) loadTestRunner.getLoadTest();
String label = null;
long mod = timePassed % (burstDelay + burstDuration);
if (mod < burstDelay) {
wsdlLoadTest.setThreadCount(0);
label = (burstDelay - mod) / 1000 + "s delay left";
} else {
wsdlLoadTest.setThreadCount(threadCount);
label = ((burstDelay + burstDuration) - mod) / 1000 + "s burst left";
}
if (infoLabel != null && !infoLabel.getText().equals(label)) {
infoLabel.setText(label);