Implement LogicalTime

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • 3.5.3
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding 2017-02-13
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The LogicalTime class contains the time and defines the operations allowed with this time.

      class LogicalTime {
        public:
            LogicalTime();
            LogicalTime(Timestamp);
            
            LogicalTime(const LogicalTime&) = default;
            LogicalTime(LogicalTime&&) = default;
        
            LogicalTime& operator=(const LogicalTime&) = default;
            LogicalTime& operator=(LogicalTime&&) = default;
      
            Timestamp asTimestamp() const;
       
            // increments the clock
            void addTicks(unsigned ticks); 
            std::string toString() const;
      
        private:
           uint64_t _time{0};
        };
      

      Add unit tests to validate the API

              Assignee:
              Misha Tyulenev (Inactive)
              Reporter:
              Misha Tyulenev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: