chromium/third_party/blink/renderer/platform/scheduler/common/process_time_override_coordinator.h

// Copyright 2023 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_COMMON_PROCESS_TIME_OVERRIDE_COORDINATOR_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_COMMON_PROCESS_TIME_OVERRIDE_COORDINATOR_H_

#include "base/containers/flat_map.h"
#include "base/functional/callback.h"
#include "base/memory/ptr_util.h"
#include "base/no_destructor.h"
#include "base/synchronization/lock.h"
#include "base/time/time.h"
#include "base/time/time_override.h"
#include "third_party/blink/renderer/platform/platform_export.h"

namespace blink::scheduler {

// This class enables multiple clients (normally, thread scheduler for different
// workers and the main thread) to maintain a synthetic time ticks value that is
// guaranteed to increase monotonically across the set of participating clients:
// each client must call `TryAdvancingTime()` whenever it is ready to advance
// time, and the time is advanced to the value that does not exceed that
// requested by any client.
class PLATFORM_EXPORT ProcessTimeOverrideCoordinator {};

}  // namespace blink::scheduler
#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_COMMON_PROCESS_TIME_OVERRIDE_COORDINATOR_H_