public static long calculateNow(InternalCache cache) {
    if (cache != null) {
      // Use cache.cacheTimeMillis here. See bug 52267.
      InternalDistributedSystem ids = cache.getInternalDistributedSystem();
      if (ids != null) {
        return ids.getClock().cacheTimeMillis();
      }
    }
    return 0L;
  }
Returns the current time in milliseconds. If the current thread has set the now thread local
then that time is return. Otherwise now is calculated and returned.

@return the current time in milliseconds
geode-core/src/main/java/org/apache/geode/internal/cache/ExpiryTask.java