EmulationClientSetVirtualTimePolicyAsync Method |
Version 88.2.90
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.
Namespace:
CefSharp.DevTools.Emulation
Assembly:
CefSharp (in CefSharp.dll) Version: 88.2.90.0 (88.2.90.0)
Syntax public Task<SetVirtualTimePolicyResponse> SetVirtualTimePolicyAsync(
VirtualTimePolicy policy,
Nullable<long> budget = null,
Nullable<int> maxVirtualTimeTaskStarvationCount = null,
Nullable<bool> waitForNavigation = null,
Nullable<long> initialVirtualTime = null
)
public:
Task<SetVirtualTimePolicyResponse^>^ SetVirtualTimePolicyAsync(
VirtualTimePolicy policy,
Nullable<long long> budget = nullptr,
Nullable<int> maxVirtualTimeTaskStarvationCount = nullptr,
Nullable<bool> waitForNavigation = nullptr,
Nullable<long long> initialVirtualTime = nullptr
)
Parameters
- policy
- Type: CefSharp.DevTools.EmulationVirtualTimePolicy
policy - budget (Optional)
- Type: SystemNullableInt64
If set, after this many virtual milliseconds have elapsed virtual time will be paused and avirtualTimeBudgetExpired event is sent. - maxVirtualTimeTaskStarvationCount (Optional)
- Type: SystemNullableInt32
If set this specifies the maximum number of tasks that can be run before virtual is forcedforwards to prevent deadlock. - waitForNavigation (Optional)
- Type: SystemNullableBoolean
If set the virtual time policy change should be deferred until any frame starts navigating.Note any previous deferred policy change is superseded. - initialVirtualTime (Optional)
- Type: SystemNullableInt64
If set, base::Time::Now will be overriden to initially return this value.
Return Value
Type:
TaskSetVirtualTimePolicyResponsereturns System.Threading.Tasks.Task<SetVirtualTimePolicyResponse>
See Also