EmulationClientSetVirtualTimePolicyAsync Method |
Version 130.1.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.EmulationAssembly: CefSharp.Core (in CefSharp.Core.dll) Version: 129.0.110.0
Syntax public Task<SetVirtualTimePolicyResponse> SetVirtualTimePolicyAsync(
VirtualTimePolicy policy,
double? budget = null,
int? maxVirtualTimeTaskStarvationCount = null,
double? initialVirtualTime = null
)
public:
Task<SetVirtualTimePolicyResponse^>^ SetVirtualTimePolicyAsync(
VirtualTimePolicy policy,
Nullable<double> budget = nullptr,
Nullable<int> maxVirtualTimeTaskStarvationCount = nullptr,
Nullable<double> initialVirtualTime = nullptr
)
Parameters
- policy VirtualTimePolicy
- policy
- budget NullableDouble (Optional)
- If set, after this many virtual milliseconds have elapsed virtual time will be paused and avirtualTimeBudgetExpired event is sent.
- maxVirtualTimeTaskStarvationCount NullableInt32 (Optional)
- If set this specifies the maximum number of tasks that can be run before virtual is forcedforwards to prevent deadlock.
- initialVirtualTime NullableDouble (Optional)
- If set, base::Time::Now will be overridden to initially return this value.
Return Value
TaskSetVirtualTimePolicyResponsereturns System.Threading.Tasks.Task<SetVirtualTimePolicyResponse>
See Also