# Uses of Interface
java.time.InstantSource

Packages that use InstantSource
Package
Description
java.time
The main API for dates, times, instants, and durations.

## Uses of InstantSource in java.time

Classes in java.time that implement InstantSource
Modifier and Type
Class
Description
`class`
`Clock`
A clock providing access to the current instant, date and time using a time-zone.
Methods in java.time that return InstantSource
Modifier and Type
Method
Description
`static InstantSource`
InstantSource.`fixed(Instant fixedInstant)`
Obtains a source that always returns the same instant.
`static InstantSource`
InstantSource.`offset(InstantSource baseSource, Duration offsetDuration)`
Obtains a source that returns instants from the specified source with the specified duration added.
`static InstantSource`
InstantSource.`system()`
Obtains a source that returns the current instant using the best available system clock.
`static InstantSource`
InstantSource.`tick(InstantSource baseSource, Duration tickDuration)`
Obtains a source that returns instants from the specified source truncated to the nearest occurrence of the specified duration.
Methods in java.time with parameters of type InstantSource
Modifier and Type
Method
Description
`static InstantSource`
InstantSource.`offset(InstantSource baseSource, Duration offsetDuration)`
Obtains a source that returns instants from the specified source with the specified duration added.
`static InstantSource`
InstantSource.`tick(InstantSource baseSource, Duration tickDuration)`
Obtains a source that returns instants from the specified source truncated to the nearest occurrence of the specified duration.