Code example for Stopwatch

Methods: elapsed

0
        watch = Stopwatch.createStarted();
    } 
 
    public int elapsed() 
    { 
        long elapsed = watch.elapsed(TimeUnit.MICROSECONDS);
        return elapsed < Integer.MAX_VALUE ? (int) elapsed : Integer.MAX_VALUE;
    } 
 
    public void trace(String format, Object arg)
    { 
        trace(MessageFormatter.format(format, arg).getMessage());
    } 
 
    public void trace(String format, Object arg1, Object arg2)
    { 
        trace(MessageFormatter.format(format, arg1, arg2).getMessage());
    } 
 
    public void trace(String format, Object[] args)
Contextual code suggestions in your IDE  Get Codota for Java