public Duration elapsed() {
        return Duration.between(startTime, isRunning() ? Instant.now() : stopTime);
    }
@Test
    public void compareTo() {
        Duration hour = Duration.ofHours(1);
        assertTrue(stopwatch.elapsed().compareTo(hour) < 0);
        assertTrue(hour.compareTo(stopwatch.elapsed()) > 0);
    }