chromium/third_party/blink/renderer/platform/scheduler/public/virtual_time_controller.h

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_PUBLIC_VIRTUAL_TIME_CONTROLLER_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_PUBLIC_VIRTUAL_TIME_CONTROLLER_H_

#include "base/functional/callback.h"
#include "base/time/time.h"
#include "third_party/blink/public/platform/scheduler/web_scoped_virtual_time_pauser.h"

namespace WTF {
class String;
}  // namespace WTF

namespace blink {

// Exposes methods to enable and control Virtual Time mode for associated
// thread scheduler. When virtual time is enabled, the system doesn't
// actually sleep for the delays between tasks before executing them.
//
// E.g: A-E are delayed tasks
//
// |    A   B C  D           E  (normal)
// |-----------------------------> time
//
// |ABCDE                       (virtual time)
// |-----------------------------> time
//
class VirtualTimeController {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_PUBLIC_VIRTUAL_TIME_CONTROLLER_H_