add
Adds the specified amount to this clock.
Atomically updates this clock to the value of the following expression:
ZonedDateTime.now(thisClock)
.plus(amountToAdd)
.toInstant()
Content copied to clipboard
Parameters
amountToAdd
the amount to add, not null
See also
Throws
if the addition cannot be made
if numeric overflow occurs
Adds the specified amount to this clock.
Atomically updates this clock to the value of the following expression:
ZonedDateTime.now(thisClock)
.plus(amountToAdd, unit)
.toInstant()
Content copied to clipboard
Parameters
amountToAdd
the amount of the specified unit to add, may be negative
unit
the unit of the amount to add, not null
See also
Throws
if the unit cannot be added
if the unit is not supported
if numeric overflow occurs