code: public void run() {
          try {
              while (--expires >= 0) {
                  sleep(sysInterval);
                  synchronized (ThreadClockImpl.class) {
                      currentTimeMillis += sysInterval;
                  }
              }
          } catch (InterruptedException e) {
              System.out.println("Clock thread interrupted");
          }
      }
docs: Threads run method that increments the clock and resets the generated
  nano seconds counter.