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();
        } 
    } 
}