lib/mock.js
function moveTime () {
  if (mock.time._SPEED) {
    // Remember what the real time was before updating.
    mock.time._PREVIOUS_TIME = realNow()
    // Set time to be incremented.
    setTimeout(function () {
      var now = realNow()
      var elapsed = now - mock.time._PREVIOUS_TIME
      if (elapsed) {
        var add = elapsed * mock.time._SPEED
        mock.time.add(add)
      }
      moveTime()
    }, 0)
  }
}
function moveTime () {
  if (mock.time._SPEED) {
    // Remember what the real time was before updating.
    mock.time._PREVIOUS_TIME = realNow()
    // Set time to be incremented.
    setTimeout(function () {
      var now = realNow()
      var elapsed = now - mock.time._PREVIOUS_TIME
      if (elapsed) {
        var add = elapsed * mock.time._SPEED
        mock.time.add(add)
      }
      moveTime()
    }, 0)
  }
}
If mock time is moving forward, schedule a time check.