Class TimeLibrary

java.lang.Object
csw.time.clock.natives.TimeLibrary

public class TimeLibrary extends Object
  • Constructor Details

    • TimeLibrary

      public TimeLibrary()
  • Method Details

    • 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