Click or drag to resize

EmulationClientSetVirtualTimePolicyAsync Method

Version 110.0.300
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: 110.0.300.0 (110.0.300.0)
Syntax
public Task<SetVirtualTimePolicyResponse> SetVirtualTimePolicyAsync(
	VirtualTimePolicy policy,
	double? budget = null,
	int? maxVirtualTimeTaskStarvationCount = null,
	double? initialVirtualTime = null
)

Parameters

policy
Type: CefSharp.DevTools.EmulationVirtualTimePolicy
policy
budget (Optional)
Type: SystemNullableDouble
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.
initialVirtualTime (Optional)
Type: SystemNullableDouble
If set, base::Time::Now will be overridden to initially return this value.

Return Value

Type: TaskSetVirtualTimePolicyResponse
returns System.Threading.Tasks.Task<SetVirtualTimePolicyResponse>
See Also