net.larsan.urd.util
Class Times

java.lang.Object
  |
  +--net.larsan.urd.util.Times

public class Times
extends java.lang.Object

A time format class for the Urd configuration. This format looks like this: 'amounttoken', where token is one of the following.

      ms  = milliseconds
      s   = seconds
      m   = minutes
      h   = hours
      d   = days
 
So that '7d' would be seven days and '16S' would be 16 seconds.

Version:
Alpha-0.1 / 2002-10-06 21:37
Author:
Lars J. Nilsson

Method Summary
static long toMillis(java.lang.String time)
          Get raw milliseconds from a time string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toMillis

public static long toMillis(java.lang.String time)
                     throws java.lang.NumberFormatException
Get raw milliseconds from a time string. This throws an number format exception if the string is malformed.

Parameters:
time - String time to parse
Returns:
The milliseconds of the parsed string
Throws:
java.lang.NumberFormatException - If the string is malformed