Package 

Class TimestampUtils


  • 
    public class TimestampUtils
    
                        

    Fuji ** Reve Systems * 2022 * This class helps to transport timstamps through network optimizedly, it also helps to convert necessary format whenever we need

    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final long MEETING_START_TIME
    • Constructor Summary

      Constructors 
      Constructor Description
      TimestampUtils(long meetingStartTime)
    • Method Summary

      Modifier and Type Method Description
      long referenceEncode(long t64) we will substract the meeting starting time from current time and send that value to network to make thetimestamp shorterassuming that the difference won't be longer than 4 byteunsigned 4 byte = (2^32) - 1 = 4294967295 (millis) = 49.
      long referenceDecode(long t32) we will add meeting starting time to the time we got from network to get the actual timestamp
      static String getFormattedDateTime(long millis)
      static long getMillis(String formattedDate)
      static String getGmtDate(long millis)
      static void main(Array<String> args)
      • Methods inherited from class java.lang.Object

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

      • TimestampUtils

        TimestampUtils(long meetingStartTime)
    • Method Detail

      • referenceEncode

         long referenceEncode(long t64)

        we will substract the meeting starting time from current time and send that value to network to make thetimestamp shorterassuming that the difference won't be longer than 4 byteunsigned 4 byte = (2^32) - 1 = 4294967295 (millis) = 49.7 daysunsigned 4 byte because we are using long and before sending to network we just simply reading 4 bytes, byusing this technique we can make use of 32nd bit (signed bit) for data

        Parameters:
        t64 - is the current time in long (8 bytes)
      • referenceDecode

         long referenceDecode(long t32)

        we will add meeting starting time to the time we got from network to get the actual timestamp

        Parameters:
        t32 - is the long (4 bytes) version of current time
      • getMillis

         static long getMillis(String formattedDate)
        Parameters:
        formattedDate - is the predefined formatted input which express clearly ay/month/hour/min/secs/millis/time-zone