Class Secs

  • All Implemented Interfaces:
    Duration, java.io.Serializable

    public class Secs
    extends ConcreteDuration
    implements java.io.Serializable
    A finite number of seconds. There are two implementations provided of the conversions methods one as object interface, where an object of the current class has to be instantiated. The oder implementation is provided as static class methods. Performance tests of both implementations have come up with a performance improvement of 20% of the static methods compared with the object methods.
    See Also:
    Serialized Form
    • Constructor Detail

      • Secs

        public Secs()
        Default constructor
      • Secs

        public Secs​(double secs)
        Construct object from an elapsed number of seconds.
        Parameters:
        secs - elapsed time [seconds]
    • Method Detail

      • asNanoSecs

        public static long asNanoSecs​(double secs)
        Parameters:
        secs - Time in secs to process
        Returns:
        Secs expressed in nanosec
      • asMins

        public static double asMins​(double secs)
        Parameters:
        secs - Time in secs to convert
        Returns:
        Secs expressed in mins
      • asHours

        public static double asHours​(double secs)
        Parameters:
        secs - Time in secs to convert
        Returns:
        Secs expressed in hours
      • asRevs

        public static double asRevs​(double secs)
        Parameters:
        secs - Time in secs to convert
        Returns:
        Secs expressed in days
      • asDays

        public static double asDays​(double secs)
        Parameters:
        secs - Time in secs to convert
        Returns:
        Secs expressed in days
      • asJulianYears

        public static double asJulianYears​(double secs)
        Parameters:
        secs - Time in secs to convert
        Returns:
        Secs expressed in JulianYears
      • clone

        public Secs clone()
        Overrides:
        clone in class java.lang.Object
        See Also:
        Object.clone()