Whetstone Class reference
Whetstone Class reference
Whetstone
WhetStone Namespaces
WhetStone.Processes
timeout Class
timeout Methods
TimeOut Method
TimeOut Method (Action, TimeSpan)
TimeOut(T) Method (Func(T), TimeSpan, T)
timeout
TimeOut 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#
Copy
public
static
bool
TimeOut
(
this
Action
action
,
TimeSpan
maxtime
)
Parameters
action
Type:
System
Action
The
Action
to invoke.
maxtime
Type:
System
TimeSpan
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
Reference
timeout Class
TimeOut Overload
WhetStone.Processes Namespace