Examples of milliseconds()


Examples of org.tehuti.utils.Time.milliseconds()

        when(mockTime.milliseconds()).thenReturn(startTime + tinyDurationMs);

        assertTrue("Throughput should not be absurdly high at beginning of window...", rc.getThroughput() <= 10);

        // Jump in time past the reset duration
        when(mockTime.milliseconds()).thenReturn(startTime + resetDurationMs + 1);

        assertEquals("Make sure counter's value has expired", 0d, rc.getThroughput(), 0.0f);
    }
}
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.