time.hpp
1 #ifndef NOOS_OBJECT_TIME
2 #define NOOS_OBJECT_TIME
3 #include "includes.ihh"
4 /*
5  * LICENSE HERE
6  */
7 namespace noos {
8 namespace object {
16 struct time
17 {
18  uint32_t seconds;
19  uint32_t nanoseconds;
20 
26  time(std::chrono::nanoseconds timepoint);
27 
29  time(const json::const_iterator & stamp);
30 
32  json::object_t to_json() const;
33 
35  bool operator==(const noos::object::time & rhs) const;
36 };
37 }
38 }
39 #endif
bool operator==(const noos::object::time &rhs) const
equality operator
Definition: asio_handler.hpp:14
time(std::chrono::nanoseconds timepoint)
Consruct using second and nanosecond.
wraps around a time-stamp (UNIX Epoch)
Definition: time.hpp:16
json::object_t to_json() const
method to pass all the data into a json object