title: atomicLong is it possible to do compareAndSet if atomic long larger than certain number?
body: <p>I wish to compare the current <code>timestamp</code> in <code>AtomicLong</code> to <code>currentTimeMS</code> so that I know if some time has passed and if yes then only a single thread would enter a block of code but from what i see <code>compareAndSet</code> only compares to a specific value and its not possible to do <code>compareAndSet</code> if value is larger or smaller than another value.  is that possible?</p>
  
  <pre><code>if (myAtomicLong.compareAndSet(larger than last atomic long value + 10 seconds, 
  System.currentTimeMillis() + 10 seconds)) {
  
  // one thread enters here only as only one thread saw that current myAtomicLong 
  // was larger than last timestamp recorded + 10 seconds.  
  // and if yes immediately set the value to next 10 seconds.
  
  // do some work
  
  }
  </code></pre>