import com.google.common.base.Stopwatch; /** * GuavaのStapwatchのデモ */ public class StopwatchDemo { public static void main(String[] args) throws InterruptedException { Stopwatch sw = Stopwatch.createUnstarted(); long[] millis = {0, 0, 0, 1, 10, 100, 1000, 10000}; int[] nanos = {10, 100, 1000, 0, 0, 0, 0, 0}; for (int i = 0; i < nanos.length; i++) { sw.start(); Thread.sleep(millis[i], nanos[i]); Sys