com.jscape.util

## Class Time

- java.lang.Object
- - com.jscape.util.Time

- All Implemented Interfaces:
    java.lang.Comparable<Time>

      public class Time
      extends java.lang.Object
      implements java.lang.Comparable<Time>

  Author:
    Alex Usun

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.util.concurrent.TimeUnit` | `unit`
    `long` | `value`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Time(long value, java.util.concurrent.TimeUnit unit)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(Time that)`
    `static Time` | `days(long value)`
    `boolean` | `equals(java.lang.Object o)`
    `int` | `hashCode()`
    `static Time` | `hours(long value)`
    `static Time` | `micros(long value)`
    `static Time` | `millis(long value)`
    `static Time` | `minutes(long value)`
    `static Time` | `nanos(long value)`
    `static Time` | `seconds(long value)`
    `void` | `sleep()`
    `void` | `sleepSafe()`
    `void` | `timedJoin(java.lang.Thread thread)`
    `void` | `timedWait(java.lang.Object obj)`
    `long` | `toDays()`
    `long` | `toHours()`
    `long` | `toMicros()`
    `long` | `toMillis()`
    `long` | `toMinutes()`
    `long` | `toNanos()`
    `long` | `toSeconds()`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### value

          public final long value

    - #### unit

          public final java.util.concurrent.TimeUnit unit

  - ### Constructor Detail

    - #### Time

          public Time(long value,
                      java.util.concurrent.TimeUnit unit)

  - ### Method Detail

    - #### nanos

          public static Time nanos(long value)

    - #### micros

          public static Time micros(long value)

    - #### millis

          public static Time millis(long value)

    - #### seconds

          public static Time seconds(long value)

    - #### minutes

          public static Time minutes(long value)

    - #### hours

          public static Time hours(long value)

    - #### days

          public static Time days(long value)

    - #### toNanos

          public long toNanos()

    - #### toMicros

          public long toMicros()

    - #### toMillis

          public long toMillis()

    - #### toSeconds

          public long toSeconds()

    - #### toMinutes

          public long toMinutes()

    - #### toHours

          public long toHours()

    - #### toDays

          public long toDays()

    - #### timedWait

          public void timedWait(java.lang.Object obj)
                         throws java.lang.InterruptedException

      Throws:
        `java.lang.InterruptedException`

    - #### timedJoin

          public void timedJoin(java.lang.Thread thread)
                         throws java.lang.InterruptedException

      Throws:
        `java.lang.InterruptedException`

    - #### sleep

          public void sleep()
                     throws java.lang.InterruptedException

      Throws:
        `java.lang.InterruptedException`

    - #### sleepSafe

          public void sleepSafe()

    - #### compareTo

          public int compareTo(Time that)

      Specified by:
        `compareTo` in interface `java.lang.Comparable<Time>`

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © Advanced Systems Concepts Inc. 2009-2021. All Rights Reserved