common.hpp: time: Added typedef for Milliseconds and MillisecondsSince1970, and use instead of double where appropriate.
diff --git a/ndn-cpp/encoding/der/der.cpp b/ndn-cpp/encoding/der/der.cpp
index 7981727..0b5531e 100644
--- a/ndn-cpp/encoding/der/der.cpp
+++ b/ndn-cpp/encoding/der/der.cpp
@@ -576,7 +576,7 @@
/*
* DerGtime
*/
-DerGtime::DerGtime(const Time& time)
+DerGtime::DerGtime(const MillisecondsSince1970& time)
:DerNode(DER_GENERALIZED_TIME)
{
string pTimeStr = toIsoString(time);
@@ -594,14 +594,14 @@
DerGtime::~DerGtime()
{}
-string DerGtime::toIsoString(const Time& time)
+string DerGtime::toIsoString(const MillisecondsSince1970& time)
{
#if 1
throw std::runtime_error("not implemented");
#endif
}
-Time DerGtime::fromIsoString(const string& isoString)
+MillisecondsSince1970 DerGtime::fromIsoString(const string& isoString)
{
#if 1
throw std::runtime_error("not implemented");
diff --git a/ndn-cpp/encoding/der/der.hpp b/ndn-cpp/encoding/der/der.hpp
index 9ed4a2a..ff92c78 100644
--- a/ndn-cpp/encoding/der/der.hpp
+++ b/ndn-cpp/encoding/der/der.hpp
@@ -355,7 +355,7 @@
class DerGtime : public DerNode
{
public:
- DerGtime(const Time& time);
+ DerGtime(const MillisecondsSince1970& time);
DerGtime(std::istream& start);
@@ -372,14 +372,14 @@
* @param time Milliseconds since 1/1/1970.
* @return The ISO string.
*/
- static std::string toIsoString(const Time& time);
+ static std::string toIsoString(const MillisecondsSince1970& time);
/**
* Convert from the ISO string representation to the internal time format.
* @param isoString The ISO time formatted string.
* @return The time in milliseconds since 1/1/1970.
*/
- static Time fromIsoString(const std::string& isoString);
+ static MillisecondsSince1970 fromIsoString(const std::string& isoString);
};
} // der