View | Details | Raw Unified | Return to bug 58165
Collapse All | Expand All

(-)C:/perso_max/workspace/JMeter_2.12/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java (-10 lines)
Line 31 Link Here
31
import org.apache.jmeter.gui.GuiPackage;
Lines 324-329 Link Here
324
        
325
        GuiPackage gp =GuiPackage.getInstance();
326
        if (gp != null) {// check there is a GUI
327
        	gp.getMainFrame().startTimer();
328
        }
329
        
Lines 459-461 Link Here
459
        if (gp != null) {// check there is a GUI
460
          	 gp.getMainFrame().stopTimer();
461
        }
(-)C:/perso_max/workspace/JMeter_2.12/src/core/org/apache/jmeter/gui/MainFrame.java (-41 lines)
Lines 45-46 Link Here
45
import java.text.SimpleDateFormat;
46
import java.util.Date;
Lines 176-177 Link Here
176
    
177
    private JLabel timeRun;
Lines 193-199 Link Here
193
    
194
    private javax.swing.Timer timer = new javax.swing.Timer(1000, new java.awt.event.ActionListener()
195
    {
196
      public void actionPerformed(java.awt.event.ActionEvent e) {
197
    	  CalculTime();
198
      }
199
    });
Lines 215-216 Link Here
215
        
216
        timeRun = new JLabel("00:00:00");
Lines 398-421 Link Here
398
    // Calcul and display the elapse time of the loadtest
399
    public void startTimer() {
400
	    timer.start();
401
    }
402
    
403
    public void stopTimer() {
404
    	timer.stop();  	
405
    }
406
    
407
    public void CalculTime() {
408
         long currentTime = System.currentTimeMillis();
409
         long startTime = JMeterContextService.getTestStartTime();
410
         if (startTime == 0)
411
        	 timer.stop();  	
412
         else
413
         {
414
	         long elapse_time_ms = (currentTime - startTime);
415
	         Date elapse_date = new Date(elapse_time_ms);
416
	         SimpleDateFormat df = new java.text.SimpleDateFormat("HH:mm:ss");
417
	         df.setTimeZone(java.util.TimeZone.getTimeZone("GMT"));
418
	         timeRun.setText(df.format(elapse_date));
419
         }
420
    }
421
    
Lines 595-598 Link Here
595
        
596
        toolPanel.add(new JLabel("   "));
597
        toolPanel.add(timeRun);
598
        toolPanel.add(new JLabel("   "));
(-)C:/perso_max/workspace/JMeter_2.12/src/core/org/apache/jmeter/engine/DistributedRunner.java (-19 lines)
Line 35 Link Here
35
import org.apache.jmeter.gui.GuiPackage;
Lines 130-135 Link Here
130
       
131
        GuiPackage gp =GuiPackage.getInstance();
132
        if (gp != null) {// check there is a GUI
133
        	gp.getMainFrame().startTimer();
134
        }
135
        
Lines 161-164 Link Here
161
        GuiPackage gp =GuiPackage.getInstance();
162
        if (gp != null) {// check there is a GUI
163
        	gp.getMainFrame().stopTimer();
164
        }
Lines 190-193 Link Here
190
        GuiPackage gp =GuiPackage.getInstance();
191
        if (gp != null) {// check there is a GUI
192
        	gp.getMainFrame().stopTimer();
193
        }
Lines 211-214 Link Here
211
        GuiPackage gp =GuiPackage.getInstance();
212
        if (gp != null) {// check there is a GUI
213
        	gp.getMainFrame().stopTimer();
214
        }

Return to bug 58165