diff --git a/ndn-cpp/c/data.h b/ndn-cpp/c/data.h
index 8d14e05..68ed6ed 100644
--- a/ndn-cpp/c/data.h
+++ b/ndn-cpp/c/data.h
@@ -46,10 +46,10 @@
  * An ndn_MetaInfo struct holds the meta info which is signed inside the data packet.
  */
 struct ndn_MetaInfo {
-  double 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 */
-  struct ndn_NameComponent finalBlockID;  /**< has a pointer to a pre-allocated buffer.  0 for none */
+  ndn_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 */
+  struct ndn_NameComponent finalBlockID; /**< has a pointer to a pre-allocated buffer.  0 for none */
 };
 
 /**
diff --git a/ndn-cpp/c/interest.h b/ndn-cpp/c/interest.h
index 12ca38e..438fecd 100644
--- a/ndn-cpp/c/interest.h
+++ b/ndn-cpp/c/interest.h
@@ -99,7 +99,7 @@
   int childSelector;        /**< -1 for none */
   int answerOriginKind;     /**< -1 for none */
   int scope;                /**< -1 for none */
-  double interestLifetimeMilliseconds; /**< milliseconds. -1.0 for none */
+  ndn_Milliseconds interestLifetimeMilliseconds; /**< milliseconds. -1.0 for none */
   struct ndn_Blob nonce;    /**< The blob whose value is a pointer to a pre-allocated buffer.  0 for none */
 };
 
diff --git a/ndn-cpp/c/util/time.c b/ndn-cpp/c/util/time.c
index a794047..9da0e1c 100644
--- a/ndn-cpp/c/util/time.c
+++ b/ndn-cpp/c/util/time.c
@@ -7,7 +7,7 @@
 #include <sys/time.h>
 #include "time.h"
 
-double 
+ndn_MillisecondsSince1970 
 ndn_getNowMilliseconds()
 {
   struct timeval t;
diff --git a/ndn-cpp/c/util/time.h b/ndn-cpp/c/util/time.h
index 36b4dad..adcb0b4 100644
--- a/ndn-cpp/c/util/time.h
+++ b/ndn-cpp/c/util/time.h
@@ -7,6 +7,8 @@
 #ifndef NDN_TIME_H
 #define NDN_TIME_H
 
+#include <ndn-cpp/c/common.h>
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
@@ -15,7 +17,7 @@
  * Use gettimeofday to return the current time in milliseconds.
  * @return The current time in milliseconds since 1/1/1970, including fractions of a millisecond according to timeval.tv_usec.
  */
-double 
+ndn_MillisecondsSince1970 
 ndn_getNowMilliseconds();
 
 #ifdef  __cplusplus
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
diff --git a/ndn-cpp/node.cpp b/ndn-cpp/node.cpp
index 35a295a..622d155 100644
--- a/ndn-cpp/node.cpp
+++ b/ndn-cpp/node.cpp
@@ -240,7 +240,7 @@
   transport_->processEvents();
   
   // Check for PIT entry timeouts.  Go backwards through the list so we can erase entries.
-  double nowMilliseconds = ndn_getNowMilliseconds();
+  MillisecondsSince1970 nowMilliseconds = ndn_getNowMilliseconds();
   for (int i = (int)pendingInterestTable_.size() - 1; i >= 0; --i) {
     if (pendingInterestTable_[i]->checkTimeout(this, nowMilliseconds)) {
       pendingInterestTable_.erase(pendingInterestTable_.begin() + i);
@@ -352,7 +352,7 @@
 }
 
 bool 
-Node::PendingInterest::checkTimeout(Node *parent, double nowMilliseconds)
+Node::PendingInterest::checkTimeout(Node *parent, MillisecondsSince1970 nowMilliseconds)
 {
   if (timeoutTimeMilliseconds_ >= 0.0 && nowMilliseconds >= timeoutTimeMilliseconds_) {
     if (onTimeout_) {
diff --git a/ndn-cpp/security/certificate/certificate.cpp b/ndn-cpp/security/certificate/certificate.cpp
index 9a01424..a1acfbf 100644
--- a/ndn-cpp/security/certificate/certificate.cpp
+++ b/ndn-cpp/security/certificate/certificate.cpp
@@ -45,7 +45,7 @@
 bool
 Certificate::isTooEarly()
 {
-  Time now = ndn_getNowMilliseconds();
+  MillisecondsSince1970 now = ndn_getNowMilliseconds();
   if(now < notBefore_)
     return true;
   else
@@ -55,7 +55,7 @@
 bool 
 Certificate::isTooLate()
 {
-  Time now = ndn_getNowMilliseconds();
+  MillisecondsSince1970 now = ndn_getNowMilliseconds();
   if(now > notAfter_)
     return true;
   else
diff --git a/ndn-cpp/security/identity/identity-manager.cpp b/ndn-cpp/security/identity/identity-manager.cpp
index f5b4657..c5a7793 100644
--- a/ndn-cpp/security/identity/identity-manager.cpp
+++ b/ndn-cpp/security/identity/identity-manager.cpp
@@ -82,7 +82,7 @@
 }
 
 Name
-IdentityManager::createIdentityCertificate(const Name& keyName, const Name& signerCertificateName, const Time& notBefore, const Time& notAfter)
+IdentityManager::createIdentityCertificate(const Name& keyName, const Name& signerCertificateName, const MillisecondsSince1970& notBefore, const MillisecondsSince1970& notAfter)
 {
   Blob keyBlob = identityStorage_->getKey(keyName);
   shared_ptr<PublicKey> publicKey = PublicKey::fromDer(keyBlob);
@@ -97,7 +97,7 @@
 
 ptr_lib::shared_ptr<IdentityCertificate>
 IdentityManager::createIdentityCertificate
-  (const Name& keyName, const PublicKey& publicKey, const Name& signerCertificateName, const Time& notBefore, const Time& notAfter)
+  (const Name& keyName, const PublicKey& publicKey, const Name& signerCertificateName, const MillisecondsSince1970& notBefore, const MillisecondsSince1970& notAfter)
 {
 #if 0
   shared_ptr<IdentityCertificate> certificate(new IdentityCertificate());
@@ -236,9 +236,9 @@
   current.tm_hour = 0;
   current.tm_min  = 0;
   current.tm_sec  = 0;
-  Time notBefore = boost::posix_time::ptime_from_tm(current);
+  MillisecondsSince1970 notBefore = boost::posix_time::ptime_from_tm(current);
   current.tm_year = current.tm_year + 20;
-  Time notAfter = boost::posix_time::ptime_from_tm(current);
+  MillisecondsSince1970 notAfter = boost::posix_time::ptime_from_tm(current);
 
   certificate->setNotBefore(notBefore);
   certificate->setNotAfter(notAfter);
