counter

fun counter(timestamp: Long = System.currentTimeMillis()): Long

Calculate the current time slot.

The timeslot is basically the number of timeSteps from TimeBasedOneTimePasswordConfig which fits into the timestamp.

Parameters

timestamp

The Unix timestamp against the counting of the time steps is calculated. The default value is the current system time from System.currentTimeMillis.


fun counter(date: Date): Long
fun counter(instant: Instant): Long

Convenience method for counter.