Code example for AtomicLong

Methods: incrementAndGet

0
    private class UniqTimer { 
        private final AtomicLong lastTime = new AtomicLong(System.currentTimeMillis());
 
 
        public long getCurrentTime() { 
            return this.lastTime.incrementAndGet();
        } 
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE