Subtracts one timeout from another.
Namespace:
Quanser.CommonAssembly: Quanser.Common (in Quanser.Common.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Function Subtract ( _ timeout As Timeout _ ) As Timeout |
C# |
---|
public Timeout Subtract( Timeout timeout ) |
Visual C++ |
---|
public: Timeout^ Subtract( Timeout^ timeout ) |
JavaScript |
---|
function subtract(timeout); |
Parameters
- timeout
- Type: Quanser.Common..::.Timeout
The timeout to subtract from this instance. This parameter is the subtrahend or right-hand side in the subtraction.
Return Value
Returns the difference between this Timeout instance and the timeout argument.Remarks
This method returns the difference between this Timeout instance and the
timeout parameter. This Timeout instance is the minuend (left-hand side) and the timeout
argument is the subtrahend (right-hand side). If the minuend is absolute and the subtrahend
is relative, then the result will be absolute. Otherwise the result is relative. In
other words, the difference of two relative timeouts is relative and the difference
between an absolute timeout and a relative timeout is absolute.
If this Timeout instance is relative and the timeout parameter is absolute then an exception is thrown.
Exceptions
Exception | Condition |
---|---|
Quanser.Common..::.GenericException | A GenericException is thrown if this Timeout instance is relative and the timeout parameter is absolute, since it is not possible to subtract an absolute time from a relative time. |