Package io.tesla.lifecycle.profiler.internal

Examples of io.tesla.lifecycle.profiler.internal.DefaultTimer.format()


  @Test
  public void testTimeFormats() throws Exception {

    Timer timer = new DefaultTimer();
    Assert.assertEquals("1ms", timer.format(1));
    Assert.assertEquals("1s 1ms", timer.format(1001));
    Assert.assertEquals("1m 1s", timer.format(61 * MS_PER_SEC));
  }

  @Test
View Full Code Here


  @Test
  public void testTimeFormats() throws Exception {

    Timer timer = new DefaultTimer();
    Assert.assertEquals("1ms", timer.format(1));
    Assert.assertEquals("1s 1ms", timer.format(1001));
    Assert.assertEquals("1m 1s", timer.format(61 * MS_PER_SEC));
  }

  @Test
  public void assertDetailLoss() {
View Full Code Here

  public void testTimeFormats() throws Exception {

    Timer timer = new DefaultTimer();
    Assert.assertEquals("1ms", timer.format(1));
    Assert.assertEquals("1s 1ms", timer.format(1001));
    Assert.assertEquals("1m 1s", timer.format(61 * MS_PER_SEC));
  }

  @Test
  public void assertDetailLoss() {
    Timer timer = new DefaultTimer();
View Full Code Here

  }

  @Test
  public void assertDetailLoss() {
    Timer timer = new DefaultTimer();
    Assert.assertEquals("1m 1s", timer.format(61 * MS_PER_SEC + 1));
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.