setVirtualTimePolicy

Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget.


suspend fun setVirtualTimePolicy(policy: Emulation.VirtualTimePolicy, budget: Double? = null, maxVirtualTimeTaskStarvationCount: Int? = null, initialVirtualTime: Double? = null): Emulation.SetVirtualTimePolicyReturn

Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget.

Parameters

policy

No description

budget

If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent.

maxVirtualTimeTaskStarvationCount

If set this specifies the maximum number of tasks that can be run before virtual is forced forwards to prevent deadlock.

initialVirtualTime

If set, base::Time::Now will be overridden to initially return this value.