Package io.zenoh.time

Class Timestamp

  • All Implemented Interfaces:

    
    public final class Timestamp
    
                        

    A Zenoh timestamp: an NTP64 instant together with the identifier of the node whose clock produced it.

    Both halves are significant. Zenoh orders and de-duplicates on the whole (ntp64, id) pair, so a timestamp is only meaningful when its id is the real identifier of the originating node — obtain it from the session that will publish the value, via session.info().zid().

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class Timestamp.Companion
    • Constructor Summary

      Constructors 
      Constructor Description
      Timestamp(<Error class: unknown class> ntp64, ZenohId id)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final <Error class: unknown class> getNtp64() The NTP64 instant.
      final ZenohId getId() Identifier of the node whose clock produced ntp64.
      final Long getNtp64()
      • Methods inherited from class java.lang.Object

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

      • Timestamp

        Timestamp(<Error class: unknown class> ntp64, ZenohId id)
    • Method Detail

      • getNtp64

         final <Error class: unknown class> getNtp64()

        The NTP64 instant. This is an unsigned 64-bit value whose high bit marks the current era; getNtp64 returns the same 64 bits in the form org.apache.commons.net.ntp.TimeStamp(long) expects.