A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://umontreal-simul.github.io/ssj/docs/master/enumumontreal_1_1ssj_1_1util_1_1TimeUnit.html below:

SSJ: TimeUnit Enum Reference

Represents a time unit for conversion of time durations. More...

Static Public Member Functions static double  convert (double value, TimeUnit srcUnit, TimeUnit dstUnit)   Converts value expressed in time unit srcUnit to a time duration expressed in dstUnit and returns the result of the conversion. More...
  enum values   NANOSECOND =("ns", "nanosecond", 1.0/3600000000000.0)   Represents a nanosecond which has short name ns.
    MICROSECOND =("us", "microsecond", 1.0/3600000000.0)   Represents a microsecond which has short name us.
    MILLISECOND =("ms", "millisecond", 1.0/3600000.0)   Represents a millisecond which has short name ms.
    SECOND =("s", "second", 1.0/3600.0)   Represents a second which has short name s.
    MINUTE =("min", "minute", 1.0/60.0)   Represents a minute which has short name min.
    HOUR =("h", "hour", 1.0)   Represents an hour which has short name h.
    DAY =("d", "day", 24.0)   Represents a day which has short name d.
    WEEK =("w", "week", 24.0*7)   Represents a week which has short name w.
  Detailed Description

Represents a time unit for conversion of time durations.

A time unit instance can be used to get information about the time unit and as a selector to perform conversions. Each time unit has a short name used when representing a time unit, a full descriptive name, and the number of hours corresponding to one unit.

Member Function Documentation ◆ convert()

Converts value expressed in time unit srcUnit to a time duration expressed in dstUnit and returns the result of the conversion.

Parameters
value the value being converted. srcUnit the source time unit. dstUnit the destination time unit.
Returns
the converted value.
Exceptions
NullPointerException if srcUnit or dstUnit are null.
◆ getHours()

Returns this time unit represented in hours.

This returns the number of hours corresponding to one unit.

Returns
the time unit represented in hours.
◆ getLongName()

Returns the long name of this time unit.

Returns
the long name of this time unit.
◆ getShortName()

Returns the short name representing this unit in a string specifying a time duration.

Returns
the short name of this time unit.
◆ toString()

The documentation for this enum was generated from the following file:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4