TicksTimeIsValid(Ticks, Ticks, Ticks) Method

Determines if time, represented by Ticks value, is valid by comparing it to the specified current time.

Definition

Namespace: Gemstone
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.181 -- Release Build+97279656b5a55675063a4190481e67c4f9809501
public bool TimeIsValid(
	Ticks currentTime,
	Ticks lagTime,
	Ticks leadTime
)

Parameters

currentTime  Ticks
Specified current time (e.g., could be DateTime.Now.Ticks).
lagTime  Ticks
The allowed lag time, in ticks, before assuming time is too old to be valid.
leadTime  Ticks
The allowed lead time, in ticks, before assuming time is too advanced to be valid.

Return Value

Boolean
True, if time represented by Ticks value, is within the specified range.

Remarks

Time, represented by Ticks value, is considered valid if it exists within the specified lagTime and leadTime range of currentTime. Note that lagTime and leadTime must be greater than zero.

Exceptions

ArgumentOutOfRangeExceptionlagTime and leadTime must be greater than zero.

See Also