# Uses of Class
org.apache.solr.common.util.TimeSource

Packages that use TimeSource
Package
Description
org.apache.solr.common.util
Common utility classes reused on both clients & server.

## Uses of TimeSource in org.apache.solr.common.util

Subclasses of TimeSource in org.apache.solr.common.util
Modifier and Type
Class
Description
`static final class`
`TimeSource.CurrentTimeSource`
Implementation that uses `System.currentTimeMillis()`.
`static final class`
`TimeSource.NanoTimeSource`
Implementation that uses `System.nanoTime()`.
`static final class`
`TimeSource.SimTimeSource`
Implementation that uses `NANO_TIME` accelerated by a double multiplier.
Fields in org.apache.solr.common.util declared as TimeSource
Modifier and Type
Field
Description
`static final TimeSource`
TimeSource.`CURRENT_TIME`
This instance uses `TimeSource.CurrentTimeSource` for generating timestamps.
`static final TimeSource`
TimeSource.`NANO_TIME`
This instance uses `TimeSource.NanoTimeSource` for generating timestamps.
Methods in org.apache.solr.common.util that return TimeSource
Modifier and Type
Method
Description
`static TimeSource`
TimeSource.`get(String type)`
Obtain an instance of time source.
Methods in org.apache.solr.common.util with parameters of type TimeSource
Modifier and Type
Method
Description
`static long`
Utils.`time(TimeSource timeSource, TimeUnit unit)`
`static long`
Utils.`timeElapsed(TimeSource timeSource, long start, TimeUnit unit)`