private void waitForInvalidate(Region.Entry entry, long p_tilt, int pauseMs) {
    long tilt = p_tilt;
    // up until the time that the expiry fires, the entry
    // better not be null...
    if (entry == null) {
      // the entire wait routine was called very late, and
      // we have no entry? That's ok.
      return;
    }
    for (;;) {
      boolean wasInvalidated = fetchEntryValue(entry) == null; // do this 1st
      long now = System.currentTimeMillis(); // do this 2nd
      if (now >= tilt) {
        // once this is true it is ok if it was invalidated
        break;
      }
      if (!wasInvalidated) {
        Wait.pause(pauseMs);
        continue;
      }
      if (now >= tilt - SLOP) {
        logger
            .warn("Entry invalidated sloppily " + "now=" + now + " tilt=" + tilt + " delta = "
                + (tilt - now));
        break;
      }
      fail("Entry invalidated prematurely " + "now=" + now + " tilt=" + tilt + " delta = "
          + (tilt - now));
    }

    // After the timeout passes, we will tolerate a slight
    // lag before the invalidate becomes visible (due to
    // system loading)
    // Slight lag? WAIT_DEFAULT is 60,000 ms. Many of our tests configure 20ms expiration.
    final int maxWaitTime = Integer.getInteger(WAIT_PROPERTY, WAIT_DEFAULT);
    tilt += maxWaitTime;
    for (;;) {
      if (fetchEntryValue(entry) == null) {
        break;
      }
      if (System.currentTimeMillis() > tilt) {
        if (fetchEntryValue(entry) == null) {
          break;
        }
        fail("Entry failed to invalidate");
      }
      Wait.pause(pauseMs);
    }
  }
Since <em>tilt</em> is the earliest time we expect, one must check the current time
<em>before</em> invoking the operation intended to keep the entry alive.

@param entry entry we want to be invalidated
@param p_tilt earliest time we expect to see the invalidate
@param pauseMs the number of milliseconds to pause before checking again
geode-dunit/src/main/java/org/apache/geode/cache30/RegionTestCase.java