diff --git a/tests/core/limited-io.cpp b/tests/core/limited-io.cpp
index b381696..1eba63d 100644
--- a/tests/core/limited-io.cpp
+++ b/tests/core/limited-io.cpp
@@ -13,7 +13,7 @@
 NFD_LOG_INIT("LimitedIo");
 
 const int LimitedIo::UNLIMITED_OPS = std::numeric_limits<int>::max();
-const time::Duration LimitedIo::UNLIMITED_TIME = time::nanoseconds(-1);
+const time::nanoseconds LimitedIo::UNLIMITED_TIME = time::nanoseconds::min();
 
 LimitedIo::LimitedIo()
   : m_isRunning(false)
@@ -22,14 +22,14 @@
 }
 
 LimitedIo::StopReason
-LimitedIo::run(int nOpsLimit, time::Duration nTimeLimit)
+LimitedIo::run(int nOpsLimit, const time::nanoseconds& nTimeLimit)
 {
   BOOST_ASSERT(!m_isRunning);
   m_isRunning = true;
   
   m_reason = NO_WORK;
   m_nOpsRemaining = nOpsLimit;
-  if (nTimeLimit != UNLIMITED_TIME) {
+  if (nTimeLimit >= time::nanoseconds::zero()) {
     m_timeout = scheduler::schedule(nTimeLimit, bind(&LimitedIo::afterTimeout, this));
   }
   
diff --git a/tests/core/limited-io.hpp b/tests/core/limited-io.hpp
index 0aae290..d3968c2 100644
--- a/tests/core/limited-io.hpp
+++ b/tests/core/limited-io.hpp
@@ -38,7 +38,7 @@
    *  \param nTimeLimit time limit, pass UNLIMITED_TIME for no limit
    */
   StopReason
-  run(int nOpsLimit, time::Duration nTimeLimit);
+  run(int nOpsLimit, const time::nanoseconds& nTimeLimit);
   
   /// count an operation
   void
@@ -53,7 +53,7 @@
 
 public:
   static const int UNLIMITED_OPS;
-  static const time::Duration UNLIMITED_TIME;
+  static const time::nanoseconds UNLIMITED_TIME;
 
 private:
   bool m_isRunning;
diff --git a/tests/core/scheduler.cpp b/tests/core/scheduler.cpp
index 806c982..87c75cf 100644
--- a/tests/core/scheduler.cpp
+++ b/tests/core/scheduler.cpp
@@ -57,18 +57,20 @@
 
 BOOST_FIXTURE_TEST_CASE(Events, SchedulerFixture)
 {
-  scheduler::schedule(time::seconds(0.5), bind(&SchedulerFixture::event1, this));
+  scheduler::schedule(time::milliseconds(500), bind(&SchedulerFixture::event1, this));
 
-  EventId i = scheduler::schedule(time::seconds(1.0), bind(&SchedulerFixture::event2, this));
+  EventId i = scheduler::schedule(time::seconds(1), bind(&SchedulerFixture::event2, this));
   scheduler::cancel(i);
 
-  scheduler::schedule(time::seconds(0.25), bind(&SchedulerFixture::event3, this));
+  scheduler::schedule(time::milliseconds(250), bind(&SchedulerFixture::event3, this));
 
-  i = scheduler::schedule(time::seconds(0.05), bind(&SchedulerFixture::event2, this));
+  i = scheduler::schedule(time::milliseconds(50), bind(&SchedulerFixture::event2, this));
   scheduler::cancel(i);
 
   // TODO deprecate periodic event
-  i = scheduler::getGlobalScheduler().schedulePeriodicEvent(time::seconds(0.3), time::seconds(0.1), bind(&SchedulerFixture::event4, this));
+  i = scheduler::getGlobalScheduler().schedulePeriodicEvent(time::milliseconds(300),
+                                                            time::milliseconds(100),
+                                                            bind(&SchedulerFixture::event4, this));
   scheduler::schedule(time::seconds(1), bind(&scheduler::cancel, i));
 
   g_io.run();
@@ -98,7 +100,7 @@
 
 BOOST_FIXTURE_TEST_CASE(SelfCancel, SelfCancelFixture)
 {
-  m_selfEventId = scheduler::schedule(time::seconds(0.1),
+  m_selfEventId = scheduler::schedule(time::milliseconds(100),
                                       bind(&SelfCancelFixture::cancelSelf, this));
 
   BOOST_REQUIRE_NO_THROW(g_io.run());
diff --git a/tests/face/tcp.cpp b/tests/face/tcp.cpp
index 332e28c..38ee797 100644
--- a/tests/face/tcp.cpp
+++ b/tests/face/tcp.cpp
@@ -349,7 +349,7 @@
                bind(&EndToEndFixture::channel_onConnectFailed, this, _1)),
            time::seconds(4)));
 
-  scheduler::schedule(time::seconds(0.5),
+  scheduler::schedule(time::milliseconds(500),
                       bind(&EndToEndFixture::checkFaceList, this, 4));
 
   BOOST_CHECK_MESSAGE(m_limitedIo.run(4,// 2 connects and 2 accepts
@@ -385,7 +385,7 @@
   BOOST_CHECK(static_cast<bool>(m_face2));
 
   // Face::close must be invoked during io run to be counted as an op
-  scheduler::schedule(time::seconds(0.1), bind(&Face::close, m_face1));
+  scheduler::schedule(time::milliseconds(100), bind(&Face::close, m_face1));
 
   BOOST_CHECK_MESSAGE(m_limitedIo.run(2, time::seconds(10)) == LimitedIo::EXCEED_OPS,
                       "FaceClosing error: cannot properly close faces");
diff --git a/tests/face/udp.cpp b/tests/face/udp.cpp
index 5e3a996..d4983bf 100644
--- a/tests/face/udp.cpp
+++ b/tests/face/udp.cpp
@@ -545,7 +545,7 @@
 
   BOOST_CHECK_NE(channel3, channel4);
 
-  scheduler::schedule(time::seconds(0.5),
+  scheduler::schedule(time::milliseconds(500),
            bind(&UdpChannel::connect, channel4, "127.0.0.1", "20070",
                 // does not work without static_cast
                 static_cast<UdpChannel::FaceCreatedCallback>(
@@ -553,7 +553,7 @@
                 static_cast<UdpChannel::ConnectFailedCallback>(
                     bind(&EndToEndFixture::channel_onConnectFailed, this, _1))));
 
-  scheduler::schedule(time::seconds(0.4), bind(&EndToEndFixture::checkFaceList, this, 2));
+  scheduler::schedule(time::milliseconds(400), bind(&EndToEndFixture::checkFaceList, this, 2));
 
   BOOST_CHECK_MESSAGE(m_limitedIo.run(2,// 2 connects
                       time::seconds(4)) == LimitedIo::EXCEED_OPS,
@@ -727,7 +727,7 @@
 //  BOOST_CHECK_NE(channel3, channel4);
 //
 //  scheduler
-//  .scheduleEvent(time::seconds(0.5),
+//  .scheduleEvent(time::milliseconds(500),
 //                 bind(&UdpChannel::connect, channel4,
 //                      "::1", "20070",
 //                      static_cast<UdpChannel::FaceCreatedCallback>(bind(&EndToEndFixture::
@@ -806,7 +806,7 @@
   BOOST_CHECK(static_cast<bool>(m_face2));
 
   // Face::close must be invoked during io run to be counted as an op
-  scheduler::schedule(time::seconds(0.1), bind(&Face::close, m_face2));
+  scheduler::schedule(time::milliseconds(100), bind(&Face::close, m_face2));
 
   BOOST_CHECK_MESSAGE(m_limitedIo.run(1, time::seconds(4)) == LimitedIo::EXCEED_OPS,
                       "FaceClosing error: cannot properly close faces");
diff --git a/tests/fw/forwarder.cpp b/tests/fw/forwarder.cpp
index 7ec90a5..c96e57a 100644
--- a/tests/fw/forwarder.cpp
+++ b/tests/fw/forwarder.cpp
@@ -24,7 +24,7 @@
   Name nameAB ("ndn:/A/B");
   Name nameABC("ndn:/A/B/C");
   shared_ptr<Interest> interestAB = makeInterest(nameAB);
-  interestAB->setInterestLifetime(4000);
+  interestAB->setInterestLifetime(time::seconds(4));
   shared_ptr<Data> dataABC = makeData(nameABC);
 
   shared_ptr<DummyFace> face1 = make_shared<DummyFace>();
@@ -317,10 +317,10 @@
   BOOST_CHECK_EQUAL(strategyQ->m_beforeSatisfyPendingInterest_count, 1);
 
   shared_ptr<Interest> interest3 = makeInterest("ndn:/A/3");
-  interest3->setInterestLifetime(30);
+  interest3->setInterestLifetime(time::milliseconds(30));
   forwarder.onInterest(*face1, *interest3);
   shared_ptr<Interest> interest4 = makeInterest("ndn:/B/4");
-  interest4->setInterestLifetime(5000);
+  interest4->setInterestLifetime(time::milliseconds(5000));
   forwarder.onInterest(*face1, *interest4);
 
   strategyP->m_beforeExpirePendingInterest_count = 0;
diff --git a/tests/fw/ncc-strategy.cpp b/tests/fw/ncc-strategy.cpp
index d980c49..044b3ec 100644
--- a/tests/fw/ncc-strategy.cpp
+++ b/tests/fw/ncc-strategy.cpp
@@ -49,7 +49,7 @@
   // first Interest: strategy knows nothing and follows routing
   shared_ptr<Interest> interest1p = makeInterest("ndn:/0Jm1ajrW/%00");
   Interest& interest1 = *interest1p;
-  interest1.setInterestLifetime(8000);
+  interest1.setInterestLifetime(time::milliseconds(8000));
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(interest1).first;
 
   pitEntry1->insertOrUpdateInRecord(face3, interest1);
@@ -74,7 +74,7 @@
   // second Interest: strategy knows face2 is best
   shared_ptr<Interest> interest2p = makeInterest("ndn:/0Jm1ajrW/%00%01");
   Interest& interest2 = *interest2p;
-  interest2.setInterestLifetime(8000);
+  interest2.setInterestLifetime(time::milliseconds(8000));
   shared_ptr<pit::Entry> pitEntry2 = pit.insert(interest2).first;
 
   pitEntry2->insertOrUpdateInRecord(face3, interest2);
diff --git a/tests/mgmt/command-validator.cpp b/tests/mgmt/command-validator.cpp
index 3dcae24..e2cf51c 100644
--- a/tests/mgmt/command-validator.cpp
+++ b/tests/mgmt/command-validator.cpp
@@ -84,7 +84,7 @@
   generateIdentity(const Name& prefix)
   {
     m_identityName = prefix;
-    m_identityName.append(boost::lexical_cast<std::string>(ndn::time::now()));
+    m_identityName.appendVersion();
 
     const Name certName = m_keys.createIdentity(m_identityName);
 
diff --git a/tests/mgmt/status-server.cpp b/tests/mgmt/status-server.cpp
index 3d8442b..99aa9f8 100644
--- a/tests/mgmt/status-server.cpp
+++ b/tests/mgmt/status-server.cpp
@@ -17,16 +17,6 @@
 
 BOOST_FIXTURE_TEST_SUITE(MgmtStatusServer, BaseFixture)
 
-static inline ndn::nfd::Status::Timestamp
-now()
-{
-  return ndn::nfd::Status::Timestamp(
-    boost::chrono::duration_cast<ndn::nfd::Status::Timestamp::duration>(
-      boost::chrono::system_clock::now().time_since_epoch()
-    )
-  );
-}
-
 shared_ptr<const Data> g_response;
 
 void
@@ -38,12 +28,12 @@
 BOOST_AUTO_TEST_CASE(Status)
 {
   // initialize
-  ndn::nfd::Status::Timestamp t1 = now();
+  time::system_clock::TimePoint t1 = time::system_clock::now();
   Forwarder forwarder;
   shared_ptr<InternalFace> internalFace = make_shared<InternalFace>();
   internalFace->onReceiveData += &interceptResponse;
   StatusServer statusServer(internalFace, boost::ref(forwarder));
-  ndn::nfd::Status::Timestamp t2 = now();
+  time::system_clock::TimePoint t2 = time::system_clock::now();
   
   // populate tables
   forwarder.getFib().insert("ndn:/fib1");
@@ -64,9 +54,9 @@
   request->setChildSelector(1);
   
   g_response.reset();
-  ndn::nfd::Status::Timestamp t3 = now();
+  time::system_clock::TimePoint t3 = time::system_clock::now();
   internalFace->sendInterest(*request);
-  ndn::nfd::Status::Timestamp t4 = now();
+  time::system_clock::TimePoint t4 = time::system_clock::now();
   BOOST_REQUIRE(static_cast<bool>(g_response));
   
   // verify
@@ -74,10 +64,10 @@
   BOOST_REQUIRE_NO_THROW(status.wireDecode(g_response->getContent()));
   
   BOOST_CHECK_EQUAL(status.getNfdVersion(), NFD_VERSION);
-  BOOST_CHECK_GE(status.getStartTimestamp(), t1);
-  BOOST_CHECK_LE(status.getStartTimestamp(), t2);
-  BOOST_CHECK_GE(status.getCurrentTimestamp(), t3);
-  BOOST_CHECK_LE(status.getCurrentTimestamp(), t4);
+  BOOST_CHECK_GE(time::toUnixTimestamp(status.getStartTimestamp()), time::toUnixTimestamp(t1));
+  BOOST_CHECK_LE(time::toUnixTimestamp(status.getStartTimestamp()), time::toUnixTimestamp(t2));
+  BOOST_CHECK_GE(time::toUnixTimestamp(status.getCurrentTimestamp()), time::toUnixTimestamp(t3));
+  BOOST_CHECK_LE(time::toUnixTimestamp(status.getCurrentTimestamp()), time::toUnixTimestamp(t4));
   
   // StatusServer under test isn't added to Forwarder,
   // so request and response won't affect table size
diff --git a/tests/table/cs.cpp b/tests/table/cs.cpp
index cf0929c..5bb6eb7 100644
--- a/tests/table/cs.cpp
+++ b/tests/table/cs.cpp
@@ -176,13 +176,13 @@
   
   Name name2("/insert/fresh");
   shared_ptr<Data> data2 = make_shared<Data>(name2);
-  data2->setFreshnessPeriod(5000);
+  data2->setFreshnessPeriod(time::milliseconds(5000));
   data2->setSignature(fakeSignature);
   cs.insert(*data2);
   
   Name name("/insert/expire");
   shared_ptr<Data> data = make_shared<Data>(name);
-  data->setFreshnessPeriod(500);
+  data->setFreshnessPeriod(time::milliseconds(500));
   data->setSignature(fakeSignature);
   cs.insert(*data);
   
@@ -508,7 +508,7 @@
   
   Name name("/insert/nonfresh");
   shared_ptr<Data> data = make_shared<Data>(name);
-  data->setFreshnessPeriod(500);
+  data->setFreshnessPeriod(time::milliseconds(500));
   data->setSignature(fakeSignature);
   cs.insert(*data);
   
@@ -652,7 +652,7 @@
   insert(uint32_t id, const Name& name)
   {
     shared_ptr<Data> data = make_shared<Data>(name);
-    data->setFreshnessPeriod(99999);
+    data->setFreshnessPeriod(time::milliseconds(99999));
     data->setContent(reinterpret_cast<const uint8_t*>(&id), sizeof(id));
     
     ndn::SignatureSha256WithRsa fakeSignature;
diff --git a/tests/table/pit.cpp b/tests/table/pit.cpp
index bf1e073..17df2d7 100644
--- a/tests/table/pit.cpp
+++ b/tests/table/pit.cpp
@@ -21,16 +21,16 @@
   Name name("ndn:/KuYfjtRq");
   shared_ptr<Interest> interest  = makeInterest(name);
   shared_ptr<Interest> interest1 = makeInterest(name);
-  interest1->setInterestLifetime(static_cast<ndn::Milliseconds>(2528));
+  interest1->setInterestLifetime(time::milliseconds(2528));
   interest1->setNonce(25559);
   shared_ptr<Interest> interest2 = makeInterest(name);
-  interest2->setInterestLifetime(static_cast<ndn::Milliseconds>(6464));
+  interest2->setInterestLifetime(time::milliseconds(6464));
   interest2->setNonce(19004);
   shared_ptr<Interest> interest3 = makeInterest(name);
-  interest3->setInterestLifetime(static_cast<ndn::Milliseconds>(3585));
+  interest3->setInterestLifetime(time::milliseconds(3585));
   interest3->setNonce(24216);
   shared_ptr<Interest> interest4 = makeInterest(name);
-  interest4->setInterestLifetime(static_cast<ndn::Milliseconds>(8795));
+  interest4->setInterestLifetime(time::milliseconds(8795));
   interest4->setNonce(17365);
 
   pit::Entry entry(*interest);
@@ -44,10 +44,10 @@
   BOOST_CHECK_EQUAL(outRecords1.size(), 0);
 
   // insert InRecord
-  time::Point before1 = time::now();
+  time::steady_clock::TimePoint before1 = time::steady_clock::now();
   pit::InRecordCollection::iterator in1 =
     entry.insertOrUpdateInRecord(face1, *interest1);
-  time::Point after1 = time::now();
+  time::steady_clock::TimePoint after1 = time::steady_clock::now();
   const pit::InRecordCollection& inRecords2 = entry.getInRecords();
   BOOST_CHECK_EQUAL(inRecords2.size(), 1);
   BOOST_CHECK(in1 == inRecords2.begin());
@@ -55,15 +55,15 @@
   BOOST_CHECK_EQUAL(in1->getLastNonce(), interest1->getNonce());
   BOOST_CHECK_GE(in1->getLastRenewed(), before1);
   BOOST_CHECK_LE(in1->getLastRenewed(), after1);
-  BOOST_CHECK_LE(std::abs(in1->getExpiry() - in1->getLastRenewed()
-    - time::milliseconds(interest1->getInterestLifetime())),
-    (after1 - before1));
+  BOOST_CHECK_LE(in1->getExpiry() - in1->getLastRenewed()
+                 - interest1->getInterestLifetime(),
+                 (after1 - before1));
 
   // insert OutRecord
-  time::Point before2 = time::now();
+  time::steady_clock::TimePoint before2 = time::steady_clock::now();
   pit::OutRecordCollection::iterator out1 =
     entry.insertOrUpdateOutRecord(face1, *interest1);
-  time::Point after2 = time::now();
+  time::steady_clock::TimePoint after2 = time::steady_clock::now();
   const pit::OutRecordCollection& outRecords2 = entry.getOutRecords();
   BOOST_CHECK_EQUAL(outRecords2.size(), 1);
   BOOST_CHECK(out1 == outRecords2.begin());
@@ -71,23 +71,23 @@
   BOOST_CHECK_EQUAL(out1->getLastNonce(), interest1->getNonce());
   BOOST_CHECK_GE(out1->getLastRenewed(), before2);
   BOOST_CHECK_LE(out1->getLastRenewed(), after2);
-  BOOST_CHECK_LE(std::abs(out1->getExpiry() - out1->getLastRenewed()
-    - time::milliseconds(interest1->getInterestLifetime())),
-    (after2 - before2));
+  BOOST_CHECK_LE(out1->getExpiry() - out1->getLastRenewed()
+                 - interest1->getInterestLifetime(),
+                 (after2 - before2));
 
   // update InRecord
-  time::Point before3 = time::now();
+  time::steady_clock::TimePoint before3 = time::steady_clock::now();
   pit::InRecordCollection::iterator in2 =
     entry.insertOrUpdateInRecord(face1, *interest2);
-  time::Point after3 = time::now();
+  time::steady_clock::TimePoint after3 = time::steady_clock::now();
   const pit::InRecordCollection& inRecords3 = entry.getInRecords();
   BOOST_CHECK_EQUAL(inRecords3.size(), 1);
   BOOST_CHECK(in2 == inRecords3.begin());
   BOOST_CHECK_EQUAL(in2->getFace(), face1);
   BOOST_CHECK_EQUAL(in2->getLastNonce(), interest2->getNonce());
-  BOOST_CHECK_LE(std::abs(in2->getExpiry() - in2->getLastRenewed()
-    - time::milliseconds(interest2->getInterestLifetime())),
-    (after3 - before3));
+  BOOST_CHECK_LE(in2->getExpiry() - in2->getLastRenewed()
+                 - interest2->getInterestLifetime(),
+                 (after3 - before3));
 
   // insert another InRecord
   pit::InRecordCollection::iterator in3 =
@@ -130,16 +130,16 @@
 BOOST_AUTO_TEST_CASE(EntryLifetime)
 {
   shared_ptr<Interest> interest = makeInterest("ndn:/7oIEurbgy6");
-  BOOST_ASSERT(interest->getInterestLifetime() < 0); // library uses -1 to indicate unset lifetime
+  BOOST_ASSERT(interest->getInterestLifetime() < time::milliseconds::zero()); // library uses -1 to indicate unset lifetime
 
   shared_ptr<Face> face = make_shared<DummyFace>();
   pit::Entry entry(*interest);
 
   pit::InRecordCollection::iterator inIt = entry.insertOrUpdateInRecord(face, *interest);
-  BOOST_CHECK_GT(inIt->getExpiry(), time::now());
+  BOOST_CHECK_GT(inIt->getExpiry(), time::steady_clock::now());
 
   pit::OutRecordCollection::iterator outIt = entry.insertOrUpdateOutRecord(face, *interest);
-  BOOST_CHECK_GT(outIt->getExpiry(), time::now());
+  BOOST_CHECK_GT(outIt->getExpiry(), time::steady_clock::now());
 }
 
 BOOST_AUTO_TEST_CASE(EntryCanForwardTo)
@@ -174,27 +174,27 @@
   exclude2.excludeOne(Name::Component("FG1Ni6nYcf"));
 
   // base
-  Interest interestA(name1, -1, -1, exclude0, -1, false, -1, -1.0, 0);
+  Interest interestA(name1, -1, -1, exclude0, -1, false, -1, time::milliseconds::min(), 0);
   // A+exclude1
-  Interest interestB(name1, -1, -1, exclude1, -1, false, -1, -1.0, 0);
+  Interest interestB(name1, -1, -1, exclude1, -1, false, -1, time::milliseconds::min(), 0);
   // A+exclude2
-  Interest interestC(name1, -1, -1, exclude2, -1, false, -1, -1.0, 0);
+  Interest interestC(name1, -1, -1, exclude2, -1, false, -1, time::milliseconds::min(), 0);
   // A+MinSuffixComponents
-  Interest interestD(name1, 2, -1, exclude0, -1, false, -1, -1.0, 0);
+  Interest interestD(name1, 2, -1, exclude0, -1, false, -1, time::milliseconds::min(), 0);
   // A+MaxSuffixComponents
-  Interest interestE(name1, -1,  4, exclude0, -1, false, -1, -1.0, 0);
+  Interest interestE(name1, -1,  4, exclude0, -1, false, -1, time::milliseconds::min(), 0);
   // A+ChildSelector
-  Interest interestF(name1, -1, -1, exclude0,  1, false, -1, -1.0, 0);
+  Interest interestF(name1, -1, -1, exclude0,  1, false, -1, time::milliseconds::min(), 0);
   // A+MustBeFresh
-  Interest interestG(name1, -1, -1, exclude0, -1,  true, -1, -1.0, 0);
+  Interest interestG(name1, -1, -1, exclude0, -1,  true, -1, time::milliseconds::min(), 0);
   // A+Scope
-  Interest interestH(name1, -1, -1, exclude0, -1, false,  2, -1.0, 0);
+  Interest interestH(name1, -1, -1, exclude0, -1, false,  2, time::milliseconds::min(), 0);
   // A+InterestLifetime
-  Interest interestI(name1, -1, -1, exclude0, -1, false, -1, 2000, 0);
+  Interest interestI(name1, -1, -1, exclude0, -1, false, -1, time::milliseconds(2000), 0);
   // A+Nonce
-  Interest interestJ(name1, -1, -1, exclude0, -1, false, -1, -1.0, 2192);
+  Interest interestJ(name1, -1, -1, exclude0, -1, false, -1, time::milliseconds::min(), 2192);
   // different Name+exclude1
-  Interest interestK(name2, -1, -1, exclude1, -1, false, -1, -1.0, 0);
+  Interest interestK(name2, -1, -1, exclude1, -1, false, -1, time::milliseconds::min(), 0);
 
   NameTree nameTree(16);
   Pit pit(nameTree);
