Class Milliseconds


  • public class Milliseconds
    extends java.lang.Object
    Utility class containing helper methods for working with time in the form of milliseconds.
    Author:
    Garret Wilson
    • Constructor Summary

      Constructors 
      Constructor Description
      Milliseconds()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long fromDays​(long days)
      Determines the number of milliseconds from the given number of days.
      static long fromHours​(long hours)
      Determines the number of milliseconds from the given number of hours.
      static long fromMinutes​(long minutes)
      Determines the number of milliseconds from the given number of minutes.
      static long fromSeconds​(long seconds)
      Determines the number of milliseconds from the given number of seconds.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Milliseconds

        public Milliseconds()
    • Method Detail

      • fromSeconds

        public static long fromSeconds​(long seconds)
        Determines the number of milliseconds from the given number of seconds.
        Parameters:
        seconds - The number of seconds to convert.
        Returns:
        The number of milliseconds for the given number of seconds.
        See Also:
        Time.MILLISECONDS_PER_SECOND
      • fromMinutes

        public static long fromMinutes​(long minutes)
        Determines the number of milliseconds from the given number of minutes.
        Parameters:
        minutes - The number of minutes to convert.
        Returns:
        The number of milliseconds for the given number of minutes.
        See Also:
        Time.SECONDS_PER_MINUTE
      • fromHours

        public static long fromHours​(long hours)
        Determines the number of milliseconds from the given number of hours.
        Parameters:
        hours - The number of hours to convert.
        Returns:
        The number of milliseconds for the given number of hours.
        See Also:
        Time.MINUTES_PER_HOUR
      • fromDays

        public static long fromDays​(long days)
        Determines the number of milliseconds from the given number of days.
        Parameters:
        days - The number of hours to convert.
        Returns:
        The number of milliseconds for the given number of days.
        See Also:
        Time.HOURS_PER_DAY