Skip to content

RelativeHours Method ​

Definition ​

  • Namespace: JASE.Extensions
  • Assembly: JASE.Primitives.dll

int RelativeHours(DateTime input, int hours, int minimum = null) ​

csharp
int RelativeHours(DateTime input, int hours, int minimum = null)

Returns a delay in milliseconds until the specified number of hours from the input DateTime. If the time has already passed, returns the provided minimum.

Parameters ​

NameDescription
hoursThe number of hours to wait.
inputThe reference DateTime.
minimumMinimum delay in milliseconds to return.

Returns ​

Milliseconds until the target time or the minimum value, whichever is greater.