nanoseconds

The length of this unit in nanoseconds.

Samples

import kotlinx.datetime.*
import kotlin.test.*
import kotlin.time.Duration.Companion.hours

fun main() { 
   //sampleStart 
   // Constructing various time-based measurement units
val halfDay = DateTimeUnit.TimeBased(nanoseconds = 12 * 60 * 60 * 1_000_000_000L)
check(halfDay.nanoseconds == 12 * 60 * 60 * 1_000_000_000L)
check(halfDay.duration == 12.hours)
check(halfDay == DateTimeUnit.HOUR * 12)
check(halfDay == DateTimeUnit.MINUTE * 720)
check(halfDay == DateTimeUnit.SECOND * 43_200) 
   //sampleEnd
}