add

fun add(d: Duration): Long

Advance the clock by specified Duration.


fun add(p: Period): Long

Advance the clock by the specified Period. Note that unlike adding a Duration the exact amount that is added to the clock will depend on its current time and timezone. Not all days, months or years have the same length. See the documentation for Period.


fun add(n: Long, unit: TimeUnit): Long

Advance the clock by specified amount n of TimeUnit.