Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef DTNTIME_H_
00009 #define DTNTIME_H_
00010
00011 #include "ibrdtn/data/SDNV.h"
00012
00013 namespace dtn
00014 {
00015 namespace data
00016 {
00017 class DTNTime
00018 {
00019 public:
00020 DTNTime();
00021 DTNTime(size_t seconds, size_t nanoseconds = 0);
00022 DTNTime(SDNV seconds, SDNV nanoseconds);
00023 virtual ~DTNTime();
00024
00025 SDNV getTimestamp() const;
00026
00030 void set();
00031
00032 void operator+=(const size_t value);
00033
00034 size_t getLength() const;
00035
00036 private:
00037 friend std::ostream &operator<<(std::ostream &stream, const dtn::data::DTNTime &obj);
00038 friend std::istream &operator>>(std::istream &stream, dtn::data::DTNTime &obj);
00039
00040 SDNV _seconds;
00041 SDNV _nanoseconds;
00042 };
00043 }
00044 }
00045
00046
00047 #endif