Time.Length

opaque type Length

Time.Length is an opaque Long value, holding total nanoseconds

Time.Length constructor methods are attached to primitives:

  1.Day.tp       // Prints: 1 day
  33.Millis.tp   // Prints: 0.033 sec
  10.Hours.tp    // Prints: 10 hours
  99999.Nanos.tp // Prints: 0.000099999 sec

Longest Time.Length possible is:

 Long.max.Nanos.tp  // Prints: 106751 days 23 hours 47 mins 16.854775807 secs
Source
Length.scala

Def

@targetName("multiply")
inline def *(v: Byte | Short | Int | Long): Time.Length

Multiply

Multiply

Returns the product of this and given value

Inherited from
_methods
Source
Calculable.scala
@targetName("plus")
inline def +(v: Time.Length): Time.Length

Plus

Plus

Returns the sum of this and given value

Inherited from
_methods
Source
Calculable.scala
@targetName("minus")
inline def -(v: Time.Length): Time.Length

Minus

Minus

Returns difference of this and given value

Inherited from
_methods
Source
Calculable.scala
@targetName("divide")
inline def /(v: Byte | Short | Int | Long): Time.Length

Divide

Divide

Returns the quotient of this and given value

Inherited from
_methods
Source
Calculable.scala
@targetName("less")
inline def <(v: Time.Length): Boolean

Less

Less

Returns true if current value is less than given, false - otherwise

Inherited from
_methods
Source
Ordered.scala
@targetName("lessOrEqual")
inline def <=(v: Time.Length): Boolean

Less or equal

Less or equal

Returns true if current value is less or equal to given, false - otherwise

Inherited from
_methods
Source
Ordered.scala
@targetName("range")
inline def <>(to: Long.G.Range[Time.Length]

Range

Range

Returns Range from current to given value

Note. Range uses base primitive natural ordering

Inherited from
z_MethodsBase
Source
Ordered.scala
@targetName("rangeX")
inline def <>>(to: Long.G.Range[Time.Length]

Exclusive end range

Exclusive end range

Returns Range from current to given value exclusive

Note. Range uses base primitive natural ordering

Inherited from
z_MethodsBase
Source
Ordered.scala
@targetName("greater")
inline def >(v: Time.Length): Boolean

Greater

Greater

Returns true if current value is greater than given, false - otherwise

Inherited from
_methods
Source
Ordered.scala
@targetName("greaterOrEqual")
inline def >=(v: Time.Length): Boolean

Greater or equal

Greater or equal

Returns true if current value is greater or equal to given, false - otherwise

Inherited from
_methods
Source
Ordered.scala
@targetName("Opt")
inline def ?: Long.G.Opt[Time.Length]

To option

To option

Returns Long specialized option

Inherited from
_methods
Source
Base.scala
inline def daysTotal: Long

Day count

Day count

Total days (24.Hours) which fit in this time unit

Inherited from
Length
Source
Nanos.scala
inline def hours: Long

Hours remainder

Hours remainder

Hours remainder when rounded by whole day (24 hours)

Value range is from 0 to 23

Inherited from
Base
Source
Nanos.scala
inline def hoursTotal: Long

Hours count

Hours count

Total hours which fit in this time unit

Inherited from
Length
Source
Nanos.scala
inline def max(v:

Max value

Max value

Returns maximum of current or given value

Inherited from
z_MethodsBase
Source
Ordered.scala
inline def micros: Long

Microseconds remainder

Microseconds remainder

Microseconds remainder when rounded by whole millisecond

Value range is from 0 to 999

Inherited from
Base
Source
Nanos.scala
inline def microsTotal: Long

Microseconds count

Microseconds count

Total microseconds which fit in this time unit

Inherited from
Length
Source
Nanos.scala
inline def millis: Long

Milliseconds remainder

Milliseconds remainder

Milliseconds remainder when rounded by whole second

Value range is from 0 to 999

Inherited from
Base
Source
Nanos.scala
inline def millisTotal: Long

Milliseconds count

Milliseconds count

Total milliseconds which fit in this time unit

Inherited from
Length
Source
Nanos.scala
inline def min(v:

Min value

Min value

Returns minimun of current or given value

Inherited from
z_MethodsBase
Source
Ordered.scala
inline def minutes: Long

Minutes remainder

Minutes remainder

Minutes remainder when rounded by whole hour

Value range is from 0 to 59

Inherited from
Base
Source
Nanos.scala
inline def minutesTotal: Long

Minutes count

Minutes count

Total minutes which fit in this time unit

Inherited from
Length
Source
Nanos.scala
inline def nanos: Long

Nanoseconds remainder

Nanoseconds remainder

Nanoseconds remainder when rounded by whole microsecond

Value range is from 0 to 999

Inherited from
Base
Source
Nanos.scala
inline def nanosTotal: Long

Nanoseconds count

Nanoseconds count

Total nanoseconds which fit in this time unit

Note: Maximum duration expressed in nanoseconds is "7331 days, 10 hours, 50 mins, 44.854775807 secs". Unboxed over will cause problems

Inherited from
Length
Source
Nanos.scala
inline def real: Long

Real value

Real value

Returns Long value standing behind the opaque type.

This is a zero cost call.

Inherited from
_methods
Source
Base.scala
inline def roundTo(l: Time.Length)(using r: Math.Rounding): Time.Length
Inherited from
Base
Source
Nanos.scala
inline def seconds: Long

Seconds remainder

Seconds remainder

Seconds remainder when rounded by whole minute

Value range is from 0 to 59

Inherited from
Base
Source
Nanos.scala
inline def secondsTotal: Long

Seconds count

Seconds count

Total seconds which fit in this time unit

Inherited from
Length
Source
Nanos.scala
def tagBrief: String
inline def weeksTotal: Long
Inherited from
Length
Source
Nanos.scala