Skip to content

RelativeSeconds Method ​

Definition ​

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

int RelativeSeconds(DateTime input, int seconds, int minimum = null) ​

csharp
int RelativeSeconds(DateTime input, int seconds, int minimum = null)

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

Parameters ​

NameDescription
inputThe reference DateTime.
minimumMinimum delay in milliseconds to return.
secondsThe number of seconds to wait.

Returns ​

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