Compares two timeouts.

Namespace:  Quanser.Common
Assembly:  Quanser.Common (in Quanser.Common.dll)

Syntax

Visual Basic (Declaration)
Public Function Compare ( _
	timeout As Timeout _
) As Integer
C#
public int Compare(
	Timeout timeout
)
Visual C++
public:
int Compare(
	Timeout^ timeout
)
JavaScript
function compare(timeout);

Parameters

timeout
Type: Quanser.Common..::.Timeout
The timeout to compare with this instance. This parameter may be viewed as the right-hand side in the comparison.

Return Value

Returns -1 if this Timeout instance is less than the timeout parameter, 0 if it is equal to the timeout parameter, and 1 if it is greater than the timeout parameter.

Remarks

This method returns -1 if this Timeout instance is less than the timeout parameter, 0 if it is equal to the timeout parameter, and 1 if it is greater than the timeout parameter. If one of the timeouts is absolute but not the other, then the relative timeout is converted to an absolute timeout prior to the comparison. Two relative timeouts are compared as is. These semantics ensure that the result of this comparison always indicates which timeout would expire first if passed as an argument to a method supporting timeouts.

See Also