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);
