async function advanceUntilModeChanges() {
      if (!installed) {
        throw new Error(
          'Mock clock is not installed, use jasmine.clock().install()'
        );
      }
      const { counter } = tickMode;

      while (true) {
        await newMacrotask();

        if (
          tickMode.counter !== counter ||
          !installed ||
          delayedFunctionScheduler === null
        ) {
          return;
        }

        if (!delayedFunctionScheduler.isEmpty()) {
          delayedFunctionScheduler.runNextQueuedFunction(function(millis) {
            mockDate.tick(millis);
          });
        }
      }
    }
Updates the clock to automatically advance time.

With this mode, the clock advances to the first scheduled timer and fires it, in a loop.
Between each timer, it will also break the event loop, allowing any scheduled promise
callbacks to execute _before_ running the next one.

This mode allows tests to be authored in a way that does not need to be aware of the
mock clock. Consequently, tests which have been authored without a mock clock installed
can one with auto tick enabled without any other updates to the test logic.

In many cases, this can greatly improve test execution speed because asynchronous tasks
will execute as quickly as possible rather than waiting real time to complete.

Furthermore, tests can be authored in a consistent manner. They can always be written in an asynchronous style
rather than having `tick` sprinkled throughout the tests with mock time in order to manually
advance the clock.

When auto tick is enabled, `tick` can still be used to synchronously advance the clock if necessary.
@name Clock#autoTick
@function
@since 5.7.0