1   /*
2    *  Copyright (C) 1998, 2003 Gargoyle Software. All rights reserved.
3    *
4    *  This file is part of GSBase. For details on use and redistribution
5    *  please refer to the license.html file included with these sources.
6    */
7   package com.diasparsoftware.gsbase.test;
8   
9   import com.diasparsoftware.gsbase.SystemClockStopwatch;
10  
11  public class SystemClockStopwatchTest extends StopwatchTestCase {
12      protected void setUp() throws Exception {
13          setStopwatch(new SystemClockStopwatch());
14      }
15  
16      public void testLastTime() throws Exception {
17          stopwatch.start();
18          Thread.sleep(200);
19          stopwatch.stop();
20          long lastTime = stopwatch.getLastTime();
21          assertTrue(
22              "Stopwatch reads " + lastTime + " ms",
23              lastTime >= 200);
24      }
25  }