final class PreciseTime extends AnyVal with Util.Time.Like[Util.Time.PreciseTime] with Util.Time.Like.Core.A.Nanos with Any.Datum.Long.Computable[Util.Time.PreciseTime]

General timing in scalqa is done with millisecond precision and it is sufficient for most scenarios.

Moreover, most objects are value wraps of Long primitive, which makes the implementations extremely efficient.

Occasionally, however, nanosecond precision is required, and Precise package fills the gap:

val time = Time.now
val precise = time.Precise

time lp                 // Prints: 2018-05-01 13:37:25.699

precise lp              // Prints: 2018-05-01 13:37:25.699.000.000

(time === precise) lp   // Prints: true
Ordering
  1. Alphabetic
Inherited
  1. PreciseTime
  2. Any.Datum.Long.Computable
  3. Any.Datum.Z.Computable
  4. Any.Datum.Long.Ordered
  5. Any.Datum.Z.Ordered
  6. Any.Datum.Long
  7. Custom.Number.Like
  8. Any.Datum
  9. Any.Wrap
  10. Util.Time.Like.Core.A.Nanos
  11. Util.Time.Like
  12. Util.Time.Like.Core
  13. scala.AnyVal
  14. scala.Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Constant

  1. val real: Long
    Attributes
    protected
    Definition Classes
    PreciseTime_Trait_Trait

Method

  1. def abs: PreciseTime

    Absolute value

    Absolute value

    Returns absolute value of this

    Definition Classes
    _Trait → Computable
  2. def age: Util.Time.Duration

    Duration to current.

    Duration to current.

    Returns Duration from this time to current time.

    If this is in future, void Duration is returned.

    Definition Classes
    _Trait
  3. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  4. def day: Day

    Day.

    Day.

    Day, which includes this time instance.

    Definition Classes
    _Trait
  5. def dayTime: Util.Time.DayTime

    DayTime component.

    DayTime component.

    DayTime component of this time instance.

    Definition Classes
    _Trait
  6. def durationTo(that: Time): Util.Time.Duration

    Range duration

    Range duration

    Returns Duration between this and that.

    Definition Classes
    _Trait
  7. def isFuture: Boolean

    Check if in future.

    Check if in future.

    Returns true if this time is greater than current.

    Definition Classes
    _Trait
  8. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  9. def isPast: Boolean

    Check if in past.

    Check if in past.

    Returns true if this time is less or equal to current.

    Definition Classes
    _Trait
  10. def make(v: Long): PreciseTime
    Attributes
    protected
    Definition Classes
    _Trait_Trait
  11. def max(v: PreciseTime): PreciseTime

    Maximum value

    Maximum value

    Returns maximum of this and provided value

    Definition Classes
    _Trait → Ordered
  12. def min(v: PreciseTime): PreciseTime

    Minimum value

    Minimum value

    Returns minimum of this and provided value

    Definition Classes
    _Trait → Ordered
  13. def month: Util.Calendar.Month

    Month.

    Month.

    Month, which includes this time instance.

    Definition Classes
    _Trait
  14. def realNumber: Long
    Attributes
    protected
    Definition Classes
    _TraitLike
  15. def round(l: Util.Time.Duration, r: Custom.Rounding = \/): PreciseTime

    Round .

    Round .

    Rounding this up by Duration specified.

    // DayTime based generic example
    val dt: DayTime = DayTime.make(10, 15, 46, 990)
    
    dt.lp                 // Prints: 10:15:46.990
    dt.pad(1.Second).lp   // Prints: 10:15:47
    dt.pad(10.Seconds).lp // Prints: 10:15:50
    dt.pad(1.Minute).lp   // Prints: 10:16
    Definition Classes
    PreciseTime_Trait
  16. def setup: PreciseTime.type
    Attributes
    protected
    Definition Classes
    PreciseTime_Trait_Trait_Trait
  17. def subHours: Util.Time.Hours

    Hours remainder.

    Hours remainder.

    Hours remainder when rounded by whole day (24 hours).

    Value range is from 0 to 23

    Definition Classes
    _Trait
  18. def subMicros: Util.Time.Micros

    Microseconds remainder.

    Microseconds remainder.

    Microseconds remainder when rounded by whole millisecond.

    Value range is from 0 to 999

    Definition Classes
    Nanos_Trait
  19. def subMillis: Util.Time.Millis

    Milliseconds remainder.

    Milliseconds remainder.

    Milliseconds remainder when rounded by whole second.

    Value range is from 0 to 999

    Definition Classes
    _Trait
  20. def subMinutes: Util.Time.Minutes

    Minutes remainder.

    Minutes remainder.

    Minutes remainder when rounded by whole hour.

    Value range is from 0 to 59

    Definition Classes
    _Trait
  21. def subNanos: Util.Time.Nanos

    Nanoseconds remainder.

    Nanoseconds remainder.

    Nanoseconds remainder when rounded by whole microsecond.

    Value range is from 0 to 999

    Definition Classes
    Nanos_Trait
  22. def subSeconds: Util.Time.Seconds

    Seconds remainder.

    Seconds remainder.

    Seconds remainder when rounded by whole minute.

    Value range is from 0 to 59

    Definition Classes
    _Trait
  23. def toBrief: String

    Short String.

    Short String.

    Time is rounded to 1.Second.

    For current Day, day portion is ommited.

    Definition Classes
    _Trait
  24. def toString(): String

    String formated.

    String formated.

    Format is "yyyy-MM-dd HH:mm:ss.SSS".

    Definition Classes
    PreciseTime_Trait → Any
  25. def totalDays: Util.Time.Days

    Day count.

    Day count.

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

    Definition Classes
    Nanos_Trait
  26. def totalHours: Util.Time.Hours

    Hours count.

    Hours count.

    Total hours which fit in this time unit.

    Definition Classes
    Nanos_Trait
  27. def totalMicros: Util.Time.Micros

    Microseconds count.

    Microseconds count.

    Total microseconds which fit in this time unit.

    Definition Classes
    Nanos_Trait
  28. def totalMillis: Util.Time.Millis

    Milliseconds count.

    Milliseconds count.

    Total milliseconds which fit in this time unit.

    Definition Classes
    Nanos_Trait
  29. def totalMinutes: Util.Time.Minutes

    Minutes count.

    Minutes count.

    Total minutes which fit in this time unit.

    Definition Classes
    Nanos_Trait
  30. def totalNanos: Util.Time.Nanos

    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.

    Definition Classes
    PreciseTimeNanos_Trait
  31. def totalSeconds: Util.Time.Seconds

    Seconds count.

    Seconds count.

    Total seconds which fit in this time unit.

    Definition Classes
    Nanos_Trait
  32. def toTime: Time

    Time conversion.

    Time conversion.

    Converts this to Time.

    Definition Classes
    PreciseTime_Trait
  33. def year: Util.Calendar.Year

    Year.

    Year.

    Year, which includes this time instance.

    Definition Classes
    _Trait

Operator

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. def %@(v: PreciseTime): Util.Percent

    Percent At

    Percent At

    Returns percentage of this compared to v

    Definition Classes
    _Trait → Computable
  4. def *(v: Long): PreciseTime

    Multiply by

    Multiply by

    Returns a new value, which is this value multiplied by v

    Definition Classes
    _Trait
  5. def *(v: Int): PreciseTime

    Multiply by

    Multiply by

    Returns a new value, which is this value multiplied by v

    Definition Classes
    _Trait
  6. def +(l: Util.Time.Duration): PreciseTime

    Plus Duration

    Plus Duration

    Creates a new instance with specified value added

    2018.Year.start + 1.Day lp // Prints 2018-01-02 00:00
    Definition Classes
    PreciseTime_Trait
  7. def +(p: Percent): PreciseTime

    Add percent

    Add percent

    Returns a new value, which is this with added percent of this

    Definition Classes
    _Trait → Computable
  8. def +(v: PreciseTime, V: \/ = \/): PreciseTime

    Add value

    Add value

    Returns a new value, which is an addition of this and v

    Definition Classes
    _Trait → Computable
  9. def +~(v: ~[Util.Time.Duration]): PreciseTime

    Plus all

    Plus all

    Creates a new instance with added stream values

    2018.Year.start +~ (~[Duration] + 1.Day + 1.Hour + 1.Minute) lp // Prints 2018-01-02 01:01
    Definition Classes
    PreciseTime_Trait
  10. def -(l: Util.Time.Duration): PreciseTime

    Subtract value

    Subtract value

    Creates a new instance with specified value subtracted

    2018.Year.start - 1.Day lp  // Prints 2017-12-31 00:00
    Definition Classes
    PreciseTime_Trait
  11. def -(p: Percent): PreciseTime

    Subtract percent

    Subtract percent

    Returns a new value, which is this with subtracted percent of this

    Definition Classes
    _Trait → Computable
  12. def -(v: PreciseTime, V: \/ = \/): PreciseTime

    Subtract value

    Subtract value

    Returns a new value, which is a subtraction of v from this

    Definition Classes
    _Trait → Computable
  13. def -~(v: ~[Util.Time.Duration]): PreciseTime

    Subtract all values

    Subtract all values

    Creates a new instance with all stream values subtracted

    2018.Year.start -~ (~[Duration] + 1.Day + 1.Hour + 1.Minute) lp // Prints 2017-12-30 22:59
    Definition Classes
    PreciseTime_Trait
  14. def /(v: Long): PreciseTime

    Divide by

    Divide by

    Returns a new value, which is this value divided by v

    Definition Classes
    _Trait
  15. def /(v: Int): PreciseTime

    Divide by

    Divide by

    Returns a new value, which is this value divided by v

    Definition Classes
    _Trait
  16. def <(v: PreciseTime): Boolean

    Is less test

    Is less test

    Returns true if this is less than v, false otherwise

    Definition Classes
    _Trait → Ordered
  17. def <=(v: PreciseTime): Boolean

    Is less or equal test

    Is less or equal test

    Returns true if this is less or equal to v, false otherwise

    Definition Classes
    _Trait → Ordered
  18. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  19. def >(v: PreciseTime): Boolean

    Is greater test

    Is greater test

    Returns true if this is greater than v, false otherwise

    Definition Classes
    _Trait → Ordered
  20. def >=(v: PreciseTime): Boolean

    Is greater or equal test

    Is greater or equal test

    Returns true if this is greater or equal to v, false otherwise

    Definition Classes
    _Trait → Ordered