diff --git a/tests/unit-tests/mgmt/dispatcher.t.cpp b/tests/unit-tests/mgmt/dispatcher.t.cpp
index 535e8bd..9f8d34d 100644
--- a/tests/unit-tests/mgmt/dispatcher.t.cpp
+++ b/tests/unit-tests/mgmt/dispatcher.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -158,49 +158,49 @@
                                        bind([&nCallbackCalled] { ++nCallbackCalled["test/2"]; }));
 
   face.receive(*makeInterest("/root/1/test/1/%80%00"));
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 0);
   BOOST_CHECK_EQUAL(nCallbackCalled["test/2"], 0);
 
   dispatcher.addTopPrefix("/root/1");
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
 
   face.receive(*makeInterest("/root/1/test/1/%80%00"));
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 1);
   BOOST_CHECK_EQUAL(nCallbackCalled["test/2"], 0);
 
   face.receive(*makeInterest("/root/1/test/2/%80%00"));
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 1);
   BOOST_CHECK_EQUAL(nCallbackCalled["test/2"], 1);
 
   face.receive(*makeInterest("/root/2/test/1/%80%00"));
   face.receive(*makeInterest("/root/2/test/2/%80%00"));
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 1);
   BOOST_CHECK_EQUAL(nCallbackCalled["test/2"], 1);
 
   dispatcher.addTopPrefix("/root/2");
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
 
   face.receive(*makeInterest("/root/1/test/1/%80%00"));
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 2);
 
   face.receive(*makeInterest("/root/2/test/1/%80%00"));
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 3);
 
   dispatcher.removeTopPrefix("/root/1");
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
 
   face.receive(*makeInterest("/root/1/test/1/%80%00"));
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 3);
 
   face.receive(*makeInterest("/root/2/test/1/%80%00"));
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 4);
 }
 
@@ -214,7 +214,7 @@
                                        bind([&nCallbackCalled] { ++nCallbackCalled; }));
 
   dispatcher.addTopPrefix("/root");
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   face.sentData.clear();
 
   face.receive(*makeInterest("/root/test/%80%00")); // returns 403
@@ -222,7 +222,7 @@
   face.receive(*makeInterest("/root/test/%80%00/silent")); // silently ignored
   face.receive(*makeInterest("/root/test/.../invalid")); // silently ignored (wrong format)
   face.receive(*makeInterest("/root/test/.../valid"));  // silently ignored (wrong format)
-  advanceClocks(time::milliseconds(1), 20);
+  advanceClocks(1_ms, 20);
   BOOST_CHECK_EQUAL(nCallbackCalled, 0);
   BOOST_CHECK_EQUAL(face.sentData.size(), 2);
 
@@ -232,7 +232,7 @@
   BOOST_CHECK_EQUAL(ControlResponse(face.sentData[1].getContent().blockFromValue()).getCode(), 403);
 
   face.receive(*makeInterest("/root/test/%80%00/valid"));
-  advanceClocks(time::milliseconds(1), 10);
+  advanceClocks(1_ms, 10);
   BOOST_CHECK_EQUAL(nCallbackCalled, 1);
 }
 
@@ -290,15 +290,15 @@
                                            bind([&nCallbackCalled] { ++nCallbackCalled; }));
 
   dispatcher.addTopPrefix("/root");
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
 
   face.receive(*makeInterest("/root/test/%80%00"));
   BOOST_CHECK_EQUAL(nCallbackCalled, 0);
   BOOST_REQUIRE(authorizationAccept != nullptr);
 
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   authorizationAccept("");
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(nCallbackCalled, 1);
 }
 
@@ -345,13 +345,13 @@
                               });
 
   dispatcher.addTopPrefix("/root");
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   face.sentData.clear();
 
   face.receive(*makeInterest("/root/test/small/%80%00")); // returns 403
   face.receive(*makeInterest("/root/test/small/%80%00/invalid")); // returns 403
   face.receive(*makeInterest("/root/test/small/%80%00/silent")); // silently ignored
-  advanceClocks(time::milliseconds(1), 20);
+  advanceClocks(1_ms, 20);
   BOOST_CHECK_EQUAL(face.sentData.size(), 2);
 
   BOOST_CHECK(face.sentData[0].getContentType() == tlv::ContentType_Blob);
@@ -363,7 +363,7 @@
 
   auto interestSmall = *makeInterest("/root/test/small/valid");
   face.receive(interestSmall);
-  advanceClocks(time::milliseconds(1), 10);
+  advanceClocks(1_ms, 10);
 
   // one data packet is generated and sent to both places
   BOOST_CHECK_EQUAL(face.sentData.size(), 1);
@@ -375,7 +375,7 @@
 
   face.receive(*makeInterest(Name("/root/test/small/valid").appendVersion(10))); // should be ignored
   face.receive(*makeInterest(Name("/root/test/small/valid").appendSegment(20))); // should be ignored
-  advanceClocks(time::milliseconds(1), 10);
+  advanceClocks(1_ms, 10);
   BOOST_CHECK_EQUAL(face.sentData.size(), 1);
   BOOST_CHECK_EQUAL(storage.size(), 1);
 
@@ -390,7 +390,7 @@
   storage.erase("/", true); // clear the storage
   face.sentData.clear();
   face.receive(*makeInterest("/root/test/large/valid"));
-  advanceClocks(time::milliseconds(1), 10);
+  advanceClocks(1_ms, 10);
 
   // two data packets are generated, the first one will be sent to both places
   // while the second one will only be inserted into the in-memory storage
@@ -429,7 +429,7 @@
   storage.erase("/", true);// clear the storage
   face.sentData.clear();
   face.receive(*makeInterest("/root/test/reject/%80%00/valid")); // returns nack
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(face.sentData.size(), 1);
   BOOST_CHECK(face.sentData[0].getContentType() == tlv::ContentType_Nack);
   BOOST_CHECK_EQUAL(ControlResponse(face.sentData[0].getContent().blockFromValue()).getCode(), 400);
@@ -443,22 +443,22 @@
   auto post = dispatcher.addNotificationStream("test");
 
   post(block);
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(face.sentData.size(), 0);
 
   dispatcher.addTopPrefix("/root");
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   face.sentData.clear();
 
   post(block);
-  advanceClocks(time::milliseconds(1));
+  advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(face.sentData.size(), 1);
   BOOST_CHECK_EQUAL(storage.size(), 1);
 
   post(block);
   post(block);
   post(block);
-  advanceClocks(time::milliseconds(1), 10);
+  advanceClocks(1_ms, 10);
 
   BOOST_CHECK_EQUAL(face.sentData.size(), 4);
   BOOST_CHECK_EQUAL(face.sentData[0].getName(), "/root/test/%FE%00");
diff --git a/tests/unit-tests/mgmt/nfd/command-options.t.cpp b/tests/unit-tests/mgmt/nfd/command-options.t.cpp
index 470cac9..e8fe76e 100644
--- a/tests/unit-tests/mgmt/nfd/command-options.t.cpp
+++ b/tests/unit-tests/mgmt/nfd/command-options.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -37,15 +37,15 @@
   CommandOptions co;
   BOOST_CHECK_EQUAL(co.getTimeout(), CommandOptions::DEFAULT_TIMEOUT);
 
-  co.setTimeout(time::milliseconds(7414));
-  BOOST_CHECK_EQUAL(co.getTimeout(), time::milliseconds(7414));
+  co.setTimeout(7414_ms);
+  BOOST_CHECK_EQUAL(co.getTimeout(), 7414_ms);
 
   BOOST_CHECK_THROW(co.setTimeout(time::milliseconds::zero()), std::out_of_range);
   BOOST_CHECK_THROW(co.setTimeout(time::milliseconds(-1)), std::out_of_range);
-  BOOST_CHECK_EQUAL(co.getTimeout(), time::milliseconds(7414)); // unchanged after throw
+  BOOST_CHECK_EQUAL(co.getTimeout(), 7414_ms); // unchanged after throw
 
-  co.setTimeout(time::milliseconds(1));
-  BOOST_CHECK_EQUAL(co.getTimeout(), time::milliseconds(1));
+  co.setTimeout(1_ms);
+  BOOST_CHECK_EQUAL(co.getTimeout(), 1_ms);
 }
 
 BOOST_AUTO_TEST_CASE(Prefix)
diff --git a/tests/unit-tests/mgmt/nfd/control-parameters.t.cpp b/tests/unit-tests/mgmt/nfd/control-parameters.t.cpp
index 8f8f98a..199ba3b 100644
--- a/tests/unit-tests/mgmt/nfd/control-parameters.t.cpp
+++ b/tests/unit-tests/mgmt/nfd/control-parameters.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -111,7 +111,7 @@
             .setOrigin(ROUTE_ORIGIN_NLSR)
             .setCost(6)
             .setFlags(0x01)
-            .setExpirationPeriod(time::minutes(30));
+            .setExpirationPeriod(30_min);
 
   Block wire = parameters.wireEncode();
 
@@ -121,7 +121,7 @@
   BOOST_CHECK_EQUAL(decoded.getOrigin(), ROUTE_ORIGIN_NLSR);
   BOOST_CHECK_EQUAL(decoded.getCost(), 6);
   BOOST_CHECK_EQUAL(decoded.getFlags(), 0x01);
-  BOOST_CHECK_EQUAL(decoded.getExpirationPeriod(), time::milliseconds(1800000));
+  BOOST_CHECK_EQUAL(decoded.getExpirationPeriod(), 1800000_ms);
 
   BOOST_CHECK_EQUAL(decoded.hasUri(), false);
   BOOST_CHECK_EQUAL(decoded.hasLocalUri(), false);
diff --git a/tests/unit-tests/mgmt/nfd/controller.t.cpp b/tests/unit-tests/mgmt/nfd/controller.t.cpp
index 92fcedd..e9a3c4f 100644
--- a/tests/unit-tests/mgmt/nfd/controller.t.cpp
+++ b/tests/unit-tests/mgmt/nfd/controller.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -48,7 +48,7 @@
     auto responseData = makeData(face.sentInterests.at(0).getName());
     responseData->setContent(responsePayload.wireEncode());
     face.receive(*responseData);
-    this->advanceClocks(time::milliseconds(1));
+    this->advanceClocks(1_ms);
   }
 
 private:
@@ -86,7 +86,7 @@
   parameters.setUri("tcp4://192.0.2.1:6363");
 
   controller.start<FaceCreateCommand>(parameters, succeedCallback, commandFailCallback);
-  this->advanceClocks(time::milliseconds(1));
+  this->advanceClocks(1_ms);
 
   BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 1);
   const Interest& requestInterest = face.sentInterests[0];
@@ -119,7 +119,7 @@
   parameters.setUri("tcp4://192.0.2.1:6363");
 
   controller.start<FaceCreateCommand>(parameters, nullptr, commandFailCallback);
-  this->advanceClocks(time::milliseconds(1));
+  this->advanceClocks(1_ms);
 
   ControlParameters responseBody = makeFaceCreateResponse();
   ControlResponse responsePayload(201, "created");
@@ -139,7 +139,7 @@
   options.setPrefix("/localhop/net/example/router1/nfd");
 
   controller.start<RibRegisterCommand>(parameters, succeedCallback, commandFailCallback, options);
-  this->advanceClocks(time::milliseconds(1));
+  this->advanceClocks(1_ms);
 
   BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 1);
   const Interest& requestInterest = face.sentInterests[0];
@@ -167,7 +167,7 @@
   parameters.setUri("tcp4://192.0.2.1:6363");
 
   controller.start<FaceCreateCommand>(parameters, succeedCallback, commandFailCallback);
-  this->advanceClocks(time::milliseconds(1));
+  this->advanceClocks(1_ms);
 
   ControlParameters responseBody = makeFaceCreateResponse();
   ControlResponse responsePayload(201, "created");
@@ -185,7 +185,7 @@
   parameters.setUri("tcp4://192.0.2.1:6363");
 
   controller.start<FaceCreateCommand>(parameters, succeedCallback, commandFailCallback);
-  this->advanceClocks(time::milliseconds(1));
+  this->advanceClocks(1_ms);
 
   ControlResponse responsePayload(401, "Not Authenticated");
   this->respond(responsePayload);
@@ -201,7 +201,7 @@
   parameters.setUri("tcp4://192.0.2.1:6363");
 
   controller.start<FaceCreateCommand>(parameters, succeedCallback, commandFailCallback);
-  this->advanceClocks(time::milliseconds(1));
+  this->advanceClocks(1_ms);
 
   ControlParameters responseBody = makeFaceCreateResponse();
   responseBody.unsetFaceId() // FaceId is missing
@@ -220,14 +220,14 @@
   parameters.setUri("tcp4://192.0.2.1:6363");
 
   controller.start<FaceCreateCommand>(parameters, succeedCallback, commandFailCallback);
-  this->advanceClocks(time::milliseconds(1));
+  this->advanceClocks(1_ms);
 
   BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 1);
   const Interest& requestInterest = face.sentInterests[0];
 
   auto responseNack = makeNack(requestInterest, lp::NackReason::NO_ROUTE);
   face.receive(responseNack);
-  this->advanceClocks(time::milliseconds(1));
+  this->advanceClocks(1_ms);
 
   BOOST_REQUIRE_EQUAL(failCodes.size(), 1);
   BOOST_CHECK_EQUAL(failCodes.back(), Controller::ERROR_NACK);
@@ -239,11 +239,11 @@
   parameters.setUri("tcp4://192.0.2.1:6363");
 
   CommandOptions options;
-  options.setTimeout(time::milliseconds(50));
+  options.setTimeout(50_ms);
 
   controller.start<FaceCreateCommand>(parameters, succeedCallback, commandFailCallback, options);
-  this->advanceClocks(time::milliseconds(1)); // express Interest
-  this->advanceClocks(time::milliseconds(51)); // timeout
+  this->advanceClocks(1_ms); // express Interest
+  this->advanceClocks(51_ms); // timeout
 
   BOOST_REQUIRE_EQUAL(failCodes.size(), 1);
   BOOST_CHECK_EQUAL(failCodes.back(), Controller::ERROR_TIMEOUT);
@@ -255,11 +255,11 @@
   parameters.setUri("tcp4://192.0.2.1:6363");
 
   CommandOptions options;
-  options.setTimeout(time::milliseconds(50));
+  options.setTimeout(50_ms);
 
   controller.start<FaceCreateCommand>(parameters, succeedCallback, nullptr, options);
-  this->advanceClocks(time::milliseconds(1)); // express Interest
-  this->advanceClocks(time::milliseconds(51)); // timeout
+  this->advanceClocks(1_ms); // express Interest
+  this->advanceClocks(51_ms); // timeout
 
   BOOST_CHECK_EQUAL(succeeds.size(), 0);
 }
diff --git a/tests/unit-tests/mgmt/nfd/face-status.t.cpp b/tests/unit-tests/mgmt/nfd/face-status.t.cpp
index 16fe108..dee1de2 100644
--- a/tests/unit-tests/mgmt/nfd/face-status.t.cpp
+++ b/tests/unit-tests/mgmt/nfd/face-status.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -42,7 +42,7 @@
       .setFaceScope(FACE_SCOPE_LOCAL)
       .setFacePersistency(FACE_PERSISTENCY_ON_DEMAND)
       .setLinkType(LINK_TYPE_MULTI_ACCESS)
-      .setExpirationPeriod(time::seconds(10))
+      .setExpirationPeriod(10_s)
       .setNInInterests(10)
       .setNInData(200)
       .setNInNacks(1)
@@ -135,9 +135,9 @@
   FaceStatus status;
   BOOST_CHECK_EQUAL(status.hasExpirationPeriod(), false);
 
-  status.setExpirationPeriod(time::minutes(1));
+  status.setExpirationPeriod(1_min);
   BOOST_REQUIRE_EQUAL(status.hasExpirationPeriod(), true);
-  BOOST_CHECK_EQUAL(status.getExpirationPeriod(), time::minutes(1));
+  BOOST_CHECK_EQUAL(status.getExpirationPeriod(), 1_min);
 
   status.unsetExpirationPeriod();
   BOOST_CHECK_EQUAL(status.hasExpirationPeriod(), false);
diff --git a/tests/unit-tests/mgmt/nfd/rib-entry.t.cpp b/tests/unit-tests/mgmt/nfd/rib-entry.t.cpp
index 15c14d1..f2ab51a 100644
--- a/tests/unit-tests/mgmt/nfd/rib-entry.t.cpp
+++ b/tests/unit-tests/mgmt/nfd/rib-entry.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -48,13 +48,13 @@
   return RibEntry()
       .setName("/hello/world")
       .addRoute(makeRoute()
-                .setExpirationPeriod(time::seconds(10)));
+                .setExpirationPeriod(10_s));
 }
 
 BOOST_AUTO_TEST_CASE(RouteEncode)
 {
   Route route1 = makeRoute();
-  route1.setExpirationPeriod(time::seconds(10));
+  route1.setExpirationPeriod(10_s);
   const Block& wire = route1.wireEncode();
 
   static const uint8_t expected[] = {
@@ -89,15 +89,15 @@
   BOOST_CHECK_EQUAL(route.hasExpirationPeriod(), false);
   BOOST_CHECK_EQUAL(route.getExpirationPeriod(), time::milliseconds::max());
 
-  route.setExpirationPeriod(time::minutes(1));
+  route.setExpirationPeriod(1_min);
   BOOST_CHECK_EQUAL(route.hasExpirationPeriod(), true);
-  BOOST_CHECK_EQUAL(route.getExpirationPeriod(), time::minutes(1));
+  BOOST_CHECK_EQUAL(route.getExpirationPeriod(), 1_min);
 
   route.setExpirationPeriod(time::milliseconds::max());
   BOOST_CHECK_EQUAL(route.hasExpirationPeriod(), false);
   BOOST_CHECK_EQUAL(route.getExpirationPeriod(), time::milliseconds::max());
 
-  route.setExpirationPeriod(time::minutes(1));
+  route.setExpirationPeriod(1_min);
   BOOST_CHECK_EQUAL(route.hasExpirationPeriod(), true);
 
   route.unsetExpirationPeriod();
@@ -116,7 +116,7 @@
   BOOST_CHECK_NE(route1, route2);
 
   route2 = route1;
-  route2.setExpirationPeriod(time::minutes(1));
+  route2.setExpirationPeriod(1_min);
   BOOST_CHECK_NE(route1, route2);
 }
 
@@ -128,7 +128,7 @@
                   .setOrigin(ROUTE_ORIGIN_APP)
                   .setCost(32)
                   .setFlags(ROUTE_FLAG_CHILD_INHERIT)
-                  .setExpirationPeriod(time::seconds(5)));
+                  .setExpirationPeriod(5_s));
   const Block& wire = entry1.wireEncode();
 
   static const uint8_t expected[] = {
diff --git a/tests/unit-tests/mgmt/nfd/status-dataset.t.cpp b/tests/unit-tests/mgmt/nfd/status-dataset.t.cpp
index 990f7f1..2abbdaa 100644
--- a/tests/unit-tests/mgmt/nfd/status-dataset.t.cpp
+++ b/tests/unit-tests/mgmt/nfd/status-dataset.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -110,12 +110,12 @@
 BOOST_AUTO_TEST_CASE(Timeout)
 {
   CommandOptions options;
-  options.setTimeout(time::milliseconds(3000));
+  options.setTimeout(3000_ms);
   controller.fetch<FaceDataset>(
     [] (const std::vector<FaceStatus>& result) { BOOST_FAIL("fetchDataset should not succeed"); },
     datasetFailCallback,
     options);
-  this->advanceClocks(time::milliseconds(500), 7);
+  this->advanceClocks(500_ms, 7);
 
   BOOST_REQUIRE_EQUAL(failCodes.size(), 1);
   BOOST_CHECK_EQUAL(failCodes.back(), Controller::ERROR_TIMEOUT);
@@ -126,10 +126,10 @@
   controller.fetch<FaceDataset>(
     [] (const std::vector<FaceStatus>& result) { BOOST_FAIL("fetchDataset should not succeed"); },
     datasetFailCallback);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   face.receive(*makeData("/localhost/nfd/faces/list/%FD%00"));
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_REQUIRE_EQUAL(failCodes.size(), 1);
   BOOST_CHECK_EQUAL(failCodes.back(), Controller::ERROR_SERVER);
@@ -142,12 +142,12 @@
   controller.fetch<FaceDataset>(
     [] (const std::vector<FaceStatus>& result) { BOOST_FAIL("fetchDataset should not succeed"); },
     datasetFailCallback);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   FaceStatus payload;
   payload.setFaceId(5744);
   this->sendDataset("/localhost/nfd/faces/list", payload);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_REQUIRE_EQUAL(failCodes.size(), 1);
   BOOST_CHECK_EQUAL(failCodes.back(), Controller::ERROR_VALIDATION);
@@ -158,11 +158,11 @@
   controller.fetch<FaceDataset>(
     [] (const std::vector<FaceStatus>& result) { BOOST_FAIL("fetchDataset should not succeed"); },
     datasetFailCallback);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 1);
   face.receive(lp::Nack(face.sentInterests.back()));
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_REQUIRE_EQUAL(failCodes.size(), 1);
   BOOST_CHECK_EQUAL(failCodes.back(), Controller::ERROR_NACK);
@@ -173,11 +173,11 @@
   controller.fetch<FaceDataset>(
     [] (const std::vector<FaceStatus>& result) { BOOST_FAIL("fetchDataset should not succeed"); },
     datasetFailCallback);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   Name payload; // Name is not valid FaceStatus
   this->sendDataset("/localhost/nfd/faces/list", payload);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_REQUIRE_EQUAL(failCodes.size(), 1);
   BOOST_CHECK_EQUAL(failCodes.back(), Controller::ERROR_SERVER);
@@ -188,13 +188,13 @@
   controller.fetch<FaceDataset>(
     [] (const std::vector<FaceStatus>& result) { BOOST_FAIL("fetchDataset should not succeed"); },
     datasetFailCallback);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   FaceStatus payload1;
   payload1.setFaceId(10930);
   Name payload2; // Name is not valid FaceStatus
   this->sendDataset("/localhost/nfd/faces/list", payload1, payload2);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_REQUIRE_EQUAL(failCodes.size(), 1);
   BOOST_CHECK_EQUAL(failCodes.back(), Controller::ERROR_SERVER);
@@ -209,12 +209,12 @@
   controller.fetch<FaceDataset>(
     nullptr,
     datasetFailCallback);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   FaceStatus payload;
   payload.setFaceId(2577);
   this->sendDataset("/localhost/nfd/faces/list", payload);
-  BOOST_CHECK_NO_THROW(this->advanceClocks(time::milliseconds(500)));
+  BOOST_CHECK_NO_THROW(this->advanceClocks(500_ms));
 
   BOOST_CHECK_EQUAL(failCodes.size(), 0);
 }
@@ -222,12 +222,12 @@
 BOOST_AUTO_TEST_CASE(Failure)
 {
   CommandOptions options;
-  options.setTimeout(time::milliseconds(3000));
+  options.setTimeout(3000_ms);
   controller.fetch<FaceDataset>(
     [] (const std::vector<FaceStatus>& result) { BOOST_FAIL("fetchDataset should not succeed"); },
     nullptr,
     options);
-  BOOST_CHECK_NO_THROW(this->advanceClocks(time::milliseconds(500), 7));
+  BOOST_CHECK_NO_THROW(this->advanceClocks(500_ms, 7));
 }
 
 BOOST_AUTO_TEST_SUITE_END() // NoCallback
@@ -243,12 +243,12 @@
       BOOST_CHECK_EQUAL(result.getNfdVersion(), "0.4.2");
     },
     datasetFailCallback);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   ForwarderStatus payload;
   payload.setNfdVersion("0.4.2");
   this->sendDataset("/localhost/nfd/status/general", payload);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_CHECK(hasResult);
   BOOST_CHECK_EQUAL(failCodes.size(), 0);
@@ -264,14 +264,14 @@
       BOOST_CHECK_EQUAL(result.front().getFaceId(), 24485);
     },
     datasetFailCallback);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   FaceStatus payload1;
   payload1.setFaceId(24485);
   FaceStatus payload2;
   payload2.setFaceId(12987);
   this->sendDataset("/localhost/nfd/faces/list", payload1, payload2);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_CHECK(hasResult);
   BOOST_CHECK_EQUAL(failCodes.size(), 0);
@@ -290,14 +290,14 @@
       BOOST_CHECK_EQUAL(result.front().getFaceId(), 8795);
     },
     datasetFailCallback);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   Name prefix("/localhost/nfd/faces/query");
   prefix.append(filter.wireEncode());
   FaceStatus payload;
   payload.setFaceId(8795);
   this->sendDataset(prefix, payload);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_CHECK(hasResult);
   BOOST_CHECK_EQUAL(failCodes.size(), 0);
@@ -308,7 +308,7 @@
   FaceQueryFilter filter;
   filter.setUriScheme("udp4");
   CommandOptions options;
-  options.setTimeout(time::milliseconds(3000));
+  options.setTimeout(3000_ms);
   bool hasResult = false;
   controller.fetch<FaceQueryDataset>(
     filter,
@@ -319,14 +319,14 @@
     },
     datasetFailCallback,
     options);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   Name prefix("/localhost/nfd/faces/query");
   prefix.append(filter.wireEncode());
   FaceStatus payload;
   payload.setFaceId(14022);
   this->sendDataset(prefix, payload);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_CHECK(hasResult);
   BOOST_CHECK_EQUAL(failCodes.size(), 0);
@@ -342,14 +342,14 @@
       BOOST_CHECK_EQUAL(result.front().getLocalUri(), "tcp4://192.0.2.1:6363");
     },
     datasetFailCallback);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   ChannelStatus payload1;
   payload1.setLocalUri("tcp4://192.0.2.1:6363");
   ChannelStatus payload2;
   payload2.setLocalUri("udp4://192.0.2.1:6363");
   this->sendDataset("/localhost/nfd/faces/channels", payload1, payload2);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_CHECK(hasResult);
   BOOST_CHECK_EQUAL(failCodes.size(), 0);
@@ -365,14 +365,14 @@
       BOOST_CHECK_EQUAL(result.front().getPrefix(), "/wYs7fzYcfG");
     },
     datasetFailCallback);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   FibEntry payload1;
   payload1.setPrefix("/wYs7fzYcfG");
   FibEntry payload2;
   payload2.setPrefix("/LKvmnzY5S");
   this->sendDataset("/localhost/nfd/fib/list", payload1, payload2);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_CHECK(hasResult);
   BOOST_CHECK_EQUAL(failCodes.size(), 0);
@@ -389,12 +389,12 @@
       BOOST_CHECK_EQUAL(result.getNHits(), 4539);
     },
     datasetFailCallback);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   CsInfo payload;
   payload.setNHits(4539);
   this->sendDataset("/localhost/nfd/cs/info", payload);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_CHECK(hasResult);
   BOOST_CHECK_EQUAL(failCodes.size(), 0);
@@ -410,14 +410,14 @@
       BOOST_CHECK_EQUAL(result.front().getName(), "/8MLz6N3B");
     },
     datasetFailCallback);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   StrategyChoice payload1;
   payload1.setName("/8MLz6N3B");
   StrategyChoice payload2;
   payload2.setName("/svqcBu0YwU");
   this->sendDataset("/localhost/nfd/strategy-choice/list", payload1, payload2);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_CHECK(hasResult);
   BOOST_CHECK_EQUAL(failCodes.size(), 0);
@@ -433,14 +433,14 @@
       BOOST_CHECK_EQUAL(result.front().getName(), "/zXxBth97ee");
     },
     datasetFailCallback);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   RibEntry payload1;
   payload1.setName("/zXxBth97ee");
   RibEntry payload2;
   payload2.setName("/rJ8CvUpr4G");
   this->sendDataset("/localhost/nfd/rib/list", payload1, payload2);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_CHECK(hasResult);
   BOOST_CHECK_EQUAL(failCodes.size(), 0);
@@ -459,12 +459,12 @@
     },
     datasetFailCallback,
     options);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   RibEntry payload;
   payload.setName("/e6L5K4ascd");
   this->sendDataset("/localhop/nfd/rib/list", payload);
-  this->advanceClocks(time::milliseconds(500));
+  this->advanceClocks(500_ms);
 
   BOOST_CHECK(hasResult);
   BOOST_CHECK_EQUAL(failCodes.size(), 0);
diff --git a/tests/unit-tests/mgmt/status-dataset-context.t.cpp b/tests/unit-tests/mgmt/status-dataset-context.t.cpp
index 5c432a7..c5af199 100644
--- a/tests/unit-tests/mgmt/status-dataset-context.t.cpp
+++ b/tests/unit-tests/mgmt/status-dataset-context.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -54,7 +54,7 @@
               [this] (const ControlResponse& resp) {
                 sendNackHistory.push_back(resp);
               })
-    , defaultImsFresh(time::milliseconds(1000))
+    , defaultImsFresh(1000_ms)
   {
   }
 
@@ -141,8 +141,8 @@
 
 BOOST_AUTO_TEST_CASE(GetAndSet)
 {
-  auto period = time::milliseconds(9527);
-  BOOST_CHECK_EQUAL(context.getExpiry(), time::milliseconds(1000));
+  auto period = 9527_ms;
+  BOOST_CHECK_EQUAL(context.getExpiry(), 1000_ms);
   BOOST_CHECK_EQUAL(context.setExpiry(period).getExpiry(), period);
 }
 
