Class TimeLibrary


  • public class TimeLibrary
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      TimeLibrary()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int clock_gettime​(int clockId, TimeSpec timeSpec)
      Retrieves the time of the specified clock clk_id.
      static int ntp_gettimex​(NTPTimeVal ntpTimeVal)  
      • Methods inherited from class java.lang.Object

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

      • TimeLibrary

        public TimeLibrary()
    • Method Detail

      • clock_gettime

        public static int clock_gettime​(int clockId,
                                        TimeSpec timeSpec)
        Retrieves the time of the specified clock clk_id.
        Parameters:
        clockId - the identifier of the particular clock on which to act
        timeSpec - a [[TimeSpec]] structure in which seconds and nanoseconds fields are filled in.
        Returns:
        0 for success, or -1 for failure (in which case errno is set appropriately)
      • ntp_gettimex

        public static int ntp_gettimex​(NTPTimeVal ntpTimeVal)
        Parameters:
        ntpTimeVal - an [[NTPTimeVal]] structure in which the time, max‐error, and esterror fields are filled in along with information in the tai field.
        Returns:
        the current state of the clock on success, or the errors