common.hpp: time: Added typedef for Milliseconds and MillisecondsSince1970, and use instead of double where appropriate.
diff --git a/include/ndn-cpp/data.hpp b/include/ndn-cpp/data.hpp
index a99e410..1cd00f6 100644
--- a/include/ndn-cpp/data.hpp
+++ b/include/ndn-cpp/data.hpp
@@ -83,7 +83,7 @@
void
set(const struct ndn_MetaInfo& metaInfoStruct);
- double
+ MillisecondsSince1970
getTimestampMilliseconds() const { return timestampMilliseconds_; }
ndn_ContentType
@@ -96,7 +96,7 @@
getFinalBlockID() const { return finalBlockID_; }
void
- setTimestampMilliseconds(double timestampMilliseconds) { timestampMilliseconds_ = timestampMilliseconds; }
+ setTimestampMilliseconds(MillisecondsSince1970 timestampMilliseconds) { timestampMilliseconds_ = timestampMilliseconds; }
void
setType(ndn_ContentType type) { type_ = type; }
@@ -117,7 +117,7 @@
}
private:
- double timestampMilliseconds_; /**< milliseconds since 1/1/1970. -1 for none */
+ MillisecondsSince1970 timestampMilliseconds_; /**< milliseconds since 1/1/1970. -1 for none */
ndn_ContentType type_; /**< default is ndn_ContentType_DATA. -1 for none */
int freshnessSeconds_; /**< -1 for none */
Name::Component finalBlockID_; /** size 0 for none */