Interface TimeStamp

  • All Known Implementing Classes:
    TimeStampFactory

    public interface TimeStamp
    Interface TimeStamp.
    Author:
    mrk
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void add​(double seconds)
      Add the number of seconds.
      void add​(long seconds)
      Add the number of seconds.
      double diff​(TimeStamp a, TimeStamp b)
      Get the difference, i.e.
      boolean equals​(TimeStamp other)
      Does this timeStamp have the same time as the other?
      void getCurrentTime()
      Get the current time.
      long getEpicsSecondsPastEpoch()
      Get the number of seconds since the January 1, 1990, 00:00:00 UTC
      long getMilliSeconds()
      Get the number of milliSeconds since the January 1, 1970, 00:00:00 UTC
      int getNanoseconds()
      Get the number of nanoseconds within the second.
      long getSecondsPastEpoch()
      Get the number of seconds since the January 1, 1970, 00:00:00 UTC
      int getUserTag()
      Get the userTag.
      boolean le​(TimeStamp other)
      Is the time for this timeStamp earlier than or equal to the other.
      boolean lt​(TimeStamp other)
      Is the time for this timeStamp earlier than for the other?
      void normalize()
      Adjust secs and nanoseconds so that 0<=nanoseconds<nanoSecPerSec
      void put​(long milliSeconds)
      Put the time in milliSeconds since January 1, 1970, 00:00:00 UTC
      void put​(long secondsPastEpoch, int nanoseconds)
      Put the time.
      void setUserTag​(int userTag)
      set the userTag.
    • Method Detail

      • normalize

        void normalize()
        Adjust secs and nanoseconds so that 0<=nanoseconds<nanoSecPerSec
      • getSecondsPastEpoch

        long getSecondsPastEpoch()
        Get the number of seconds since the January 1, 1970, 00:00:00 UTC
        Returns:
        the number of seconds
      • getEpicsSecondsPastEpoch

        long getEpicsSecondsPastEpoch()
        Get the number of seconds since the January 1, 1990, 00:00:00 UTC
        Returns:
        the number of seconds
      • getNanoseconds

        int getNanoseconds()
        Get the number of nanoseconds within the second.
        Returns:
        the number
      • getUserTag

        int getUserTag()
        Get the userTag.
        Returns:
        the userTag
      • setUserTag

        void setUserTag​(int userTag)
        set the userTag.
        Parameters:
        userTag - the value for the userTag
      • put

        void put​(long secondsPastEpoch,
                 int nanoseconds)
        Put the time.
        Parameters:
        secondsPastEpoch - the number of seconds since January 1, 1970, 00:00:00 UTC
        nanoseconds - the number of nanoseconds within the second
      • getMilliSeconds

        long getMilliSeconds()
        Get the number of milliSeconds since the January 1, 1970, 00:00:00 UTC
        Returns:
        the number
      • put

        void put​(long milliSeconds)
        Put the time in milliSeconds since January 1, 1970, 00:00:00 UTC
        Parameters:
        milliSeconds - the number of milliSeconds
      • getCurrentTime

        void getCurrentTime()
        Get the current time.
      • equals

        boolean equals​(TimeStamp other)
        Does this timeStamp have the same time as the other?
        Parameters:
        other - the other timeStamp
        Returns:
        (false,true) if (not same, same)
      • lt

        boolean lt​(TimeStamp other)
        Is the time for this timeStamp earlier than for the other?
        Parameters:
        other - the other timeStamp
        Returns:
        (false,true) if (not less, less)
      • le

        boolean le​(TimeStamp other)
        Is the time for this timeStamp earlier than or equal to the other.
        Parameters:
        other - the other timeStamp
        Returns:
        (false,true) if (not less or equal, less or equal))
      • add

        void add​(long seconds)
        Add the number of seconds.
        Parameters:
        seconds - the number of seconds to add
      • add

        void add​(double seconds)
        Add the number of seconds.
        Parameters:
        seconds - the number of seconds to add
      • diff

        double diff​(TimeStamp a,
                    TimeStamp b)
        Get the difference, i.e. a-b
        Parameters:
        a - the first value
        b - the second value
        Returns:
        a-b