TimePoint

interface TimePoint<T>

An object that can be placed exactly in time.

An implementor of this interface contains enough information to represent an instant in time. As such, any time point can be compared to another on the timeline and duration units can be added or subtracted.

Types

Companion
Link copied to clipboard
common
object Companion

Functions

compareTo
Link copied to clipboard
common
open operator fun compareTo(other: TimePoint<*>): Int

Compares this time point with another time point.

isSameInstantAs
Link copied to clipboard
common
open fun isSameInstantAs(other: TimePoint<*>): Boolean

Checks if this time point represents the same instant as other. Unlike the equals operator, equality is determined solely by timeline order.

minus
Link copied to clipboard
common
abstract operator fun minus(hours: Hours): T
abstract operator fun minus(microseconds: Microseconds): T
abstract operator fun minus(milliseconds: Milliseconds): T
abstract operator fun minus(minutes: Minutes): T
abstract operator fun minus(nanoseconds: Nanoseconds): T
abstract operator fun minus(seconds: Seconds): T
plus
Link copied to clipboard
common
abstract operator fun plus(hours: Hours): T
abstract operator fun plus(microseconds: Microseconds): T
abstract operator fun plus(milliseconds: Milliseconds): T
abstract operator fun plus(minutes: Minutes): T
abstract operator fun plus(nanoseconds: Nanoseconds): T
abstract operator fun plus(seconds: Seconds): T

Properties

additionalNanosecondsSinceUnixEpoch
Link copied to clipboard
common
open val additionalNanosecondsSinceUnixEpoch: Nanoseconds

The number of additional nanoseconds on top of secondsSinceUnixEpoch.

millisecondOfUnixEpoch
Link copied to clipboard
common
abstract val millisecondOfUnixEpoch: Long

The millisecond of the Unix epoch.

millisecondsSinceUnixEpoch
Link copied to clipboard
common
open val millisecondsSinceUnixEpoch: Milliseconds

The number of milliseconds since the Unix epoch of 1970-01-01T00:00Z.

nanosecond
Link copied to clipboard
common
abstract val nanosecond: Int

The nanosecond of the second.

secondOfUnixEpoch
Link copied to clipboard
common
abstract val secondOfUnixEpoch: Long

The second of the Unix epoch.

secondsSinceUnixEpoch
Link copied to clipboard
common
open val secondsSinceUnixEpoch: Seconds

The number of seconds since the Unix epoch of 1970-01-01T00:00Z.

Inheritors

Instant
Link copied to clipboard
OffsetDateTime
Link copied to clipboard
ZonedDateTime
Link copied to clipboard

Extensions

toNSDate
Link copied to clipboard
darwin
fun <T> TimePoint<T>.toNSDate(): <ERROR CLASS>

Converts this time point to an NSDate.