Class Layer1ApiRequestCurrentTimeEvents

java.lang.Object
velox.api.layer1.messages.Layer1ApiRequestCurrentTimeEvents

public class Layer1ApiRequestCurrentTimeEvents extends Object
Providers time will be sent using CurrentTimeUserMessage at least as often as specified by interval There is one exception: if system was in sleep mode or system time was changed while bookmap was working, some events might be skipped, and event with CurrentTimeUserMessage.isEventsSkipped = true flag will be sent
  • Field Details

    • BOOKMAP_INTERVAL_NS

      public static final long BOOKMAP_INTERVAL_NS
    • BOOKMAP_USER_MESSAGE

      public static final Layer1ApiRequestCurrentTimeEvents BOOKMAP_USER_MESSAGE
      This message is always used by core for CurrentTimeUserMessage.
    • MIN_INTERVAL_NS

      public static final long MIN_INTERVAL_NS
    • startTimeNs

      public final long startTimeNs
    • intervalNs

      public final long intervalNs
    • isAdd

      public boolean isAdd
  • Constructor Details

    • Layer1ApiRequestCurrentTimeEvents

      public Layer1ApiRequestCurrentTimeEvents(boolean isAdd, long startTimeNs, long intervalNs)
      Parameters:
      isAdd - true if message wants to start receiving current time messages, false if to stop
      startTimeNs - time of first message sent in UTC nanoseconds
      intervalNs - in nanoseconds, at least 1 time message will be sent in every interval
      0 if you only want one message to be sent (can't be less than MIN_INTERVAL_NS)
  • Method Details

    • getIntervalNs

      public long getIntervalNs()
    • setAdd

      public void setAdd(boolean isAdd)
      Parameters:
      isAdd - true if message wants to start receiving current time messages, false if to stop
    • toString

      public String toString()
      Overrides:
      toString in class Object