DateTimeExtensionsUtcTimeIsValid Method
Determines if the specified UTC time is valid, by comparing it to the system clock.
Namespace: Gemstone.DateTimeExtensionsAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public static bool UtcTimeIsValid(
this DateTime utcTime,
double lagTime,
double leadTime
)
<ExtensionAttribute>
Public Shared Function UtcTimeIsValid (
utcTime As DateTime,
lagTime As Double,
leadTime As Double
) As Boolean
public:
[ExtensionAttribute]
static bool UtcTimeIsValid(
DateTime utcTime,
double lagTime,
double leadTime
)
Gemstone.DateTimeExtensions.DateTimeExtensions.UtcTimeIsValid = function(utcTime, lagTime, leadTime);
- utcTime DateTime
- UTC time to test for validity.
- lagTime Double
- The allowed lag time, in seconds, before assuming time is too old to be valid.
- leadTime Double
- The allowed lead time, in seconds, before assuming time is too advanced to be
valid.
BooleanTrue, if time is within the specified range.In Visual Basic and C#, you can call this method as an instance method on any object of type
DateTime. 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).
Time is considered valid if it exists within the specified lag time/lead time range of current
time.
Note that lag time and lead time must be greater than zero, but can be set to sub-second
intervals.
ArgumentOutOfRangeException | LagTime and LeadTime must be greater than zero, but can
be less than one. |