Companion

object Companion

Functions

fromNanosecondOfDay
Link copied to clipboard
common
fun fromNanosecondOfDay(nanosecondOfDay: Long): Time

Creates a Time from the nanosecond of the day.

fromNanosecondsSinceStartOfDay
Link copied to clipboard
common
fun fromNanosecondsSinceStartOfDay(nanoseconds: Nanoseconds): Time

Creates the Time at a number of nanoseconds since the start of the day.

fromSecondOfDay
Link copied to clipboard
common
fun fromSecondOfDay(secondOfDay: Int, nanosecond: Int = 0): Time

Creates a Time from the second of the day and optionally, the number of nanoseconds within that second.

fromSecondsSinceStartOfDay
Link copied to clipboard
common
fun fromSecondsSinceStartOfDay(seconds: Seconds, nanosecondAdjustment: Nanoseconds = 0.nanoseconds): Time

Creates the Time at a number of seconds since the start of the day and optionally, a number of additional nanoseconds.

Properties

MAX
Link copied to clipboard
common
val MAX: Time
MIDNIGHT
Link copied to clipboard
common
val MIDNIGHT: Time
MIN
Link copied to clipboard
common
val MIN: Time
NOON
Link copied to clipboard
common
val NOON: Time

Extensions

now
Link copied to clipboard
fun Time.Companion.now(clock: Clock): Time

Gets the current Time from the provided clock.

common
fun Time.Companion.now(): Time

Gets the current Time from the system clock.

common
fun Time.Companion.now(clock: Clock): Time

Gets the current Time from the provided clock.