Click or drag to resize

timeoutTimeOut Method (Action, TimeSpan)

Perform an Action, or cancel it if it exceeds a timeout.

Namespace:  WhetStone.Processes
Assembly:  WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax
C#
public static bool TimeOut(
	this Action action,
	TimeSpan maxtime
)

Parameters

action
Type: SystemAction
The Action to invoke.
maxtime
Type: SystemTimeSpan
The timeout to cancel action if exceeded.

Return Value

Type: Boolean
Whether the action completed within the allotted time.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Action. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also