TimingUtil

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.ctdp.rfdynhud.util
Class TimingUtil

    java.lang.Object
      net.ctdp.rfdynhud.util.TimingUtil

    public class TimingUtil

extends java.lang.Object

Provides static methods to deal with timing.

Author:
  Marvin Froehlich (CTDP)

Constructor Summary
`TimingUtil()`

Method Summary
`static java.lang.String` | `getTimeAsGapString(float seconds)`
`static java.lang.String` | `getTimeAsLaptimeString(float seconds)` Gets a formatted String from the given seconds.
`static java.lang.String` | `getTimeAsString(float seconds, boolean showMillis)` Gets a formatted String from the given seconds.
`static java.lang.String` | `getTimeAsString(float seconds, boolean forceAllFields, boolean showMillis)` Gets a formatted String from the given seconds.
`static java.lang.String` | `getTimeAsString(float seconds, boolean forceAllFields, boolean padHighest, boolean showMillis)` Gets a formatted String from the given seconds.
`static java.lang.String` | `getTimeAsString(float seconds, boolean forceAllFields, boolean padHighest, boolean showMillis, boolean showFullMillis)` Gets a formatted String from the given seconds.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TimingUtil

    public TimingUtil()

Method Detail

### getTimeAsString

    public static java.lang.String getTimeAsString(float seconds,
                                                   boolean forceAllFields,
                                                   boolean padHighest,
                                                   boolean showMillis,
                                                   boolean showFullMillis)

  Gets a formatted String from the given seconds.

  Parameters:
    `seconds` - the seconds to format to a time string
    `forceAllFields` - show hours or minutes, even, if they are all zero?
    `padHighest` - if true, the highest displayed field (i.e. hours or minuts) will be padded with a zero
    `showMillis` - show milli seconds?
    `showFullMillis` - whether to show full milliseconds or just the tenths
  Returns:
    a formatted String from the given seconds.

### getTimeAsString

    public static java.lang.String getTimeAsString(float seconds,
                                                   boolean forceAllFields,
                                                   boolean padHighest,
                                                   boolean showMillis)

  Gets a formatted String from the given seconds.

  Parameters:
    `seconds` - the seconds to format to a time string
    `forceAllFields` - show hours or minutes, even, if they are all zero?
    `padHighest` - if true, the highest displayed field (i.e. hours or minuts) will be padded with a zero
    `showMillis` - show milli seconds?
  Returns:
    a formatted String from the given seconds.

### getTimeAsString

    public static java.lang.String getTimeAsString(float seconds,
                                                   boolean forceAllFields,
                                                   boolean showMillis)

  Gets a formatted String from the given seconds.

  Parameters:
    `seconds` - the seconds to format to a time string
    `forceAllFields` - show hours or minutes, even, if they are all zero?
    `showMillis` - show milli seconds?
  Returns:
    a formatted String from the given seconds.

### getTimeAsString

    public static java.lang.String getTimeAsString(float seconds,
                                                   boolean showMillis)

  Gets a formatted String from the given seconds.

  Parameters:
    `seconds` - the seconds to format to a time string
    `showMillis` - show milli seconds?
  Returns:
    a formatted String from the given seconds.

### getTimeAsLaptimeString

    public static java.lang.String getTimeAsLaptimeString(float seconds)

  Gets a formatted String from the given seconds.

  Parameters:
    `seconds` - the seconds to format to a time string
  Returns:
    a formatted String from the given seconds.

### getTimeAsGapString

    public static java.lang.String getTimeAsGapString(float seconds)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD