Adds one timeout to another.
Namespace:
Quanser.CommonAssembly: Quanser.Common (in Quanser.Common.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Function Add ( _ timeout As Timeout _ ) As Timeout |
C# |
---|
public Timeout Add( Timeout timeout ) |
Visual C++ |
---|
public: Timeout^ Add( Timeout^ timeout ) |
JavaScript |
---|
function add(timeout); |
Parameters
- timeout
- Type: Quanser.Common..::.Timeout
The timeout to add to this instance.
Return Value
Returns the sum of this Timeout instance and the timeout argument.Remarks
This method returns the sum of this Timeout instance and the
timeout parameter. If either timeout is absolute then the result
is absolute. Otherwise the result is relative. In other words, only
the sum of two relative timeouts is relative. If both timeouts are
absolute then an exception is thrown.
Exceptions
Exception | Condition |
---|---|
Quanser.Common..::.GenericException | A GenericException is thrown if this Timeout is absolute and the timeout parameter is absolute, since it is not possible to add two absolute times. |