diff --git a/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp b/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp
index 94120c0..494eac2 100644
--- a/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp
+++ b/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp
@@ -96,16 +96,16 @@
 BOOST_AUTO_TEST_CASE(LoadRefreshInterval)
 {
   auto policy = makePolicy();
-  BOOST_CHECK_EQUAL(policy->getRefreshInterval(), time::seconds(25)); // default setting is 25
+  BOOST_CHECK_EQUAL(policy->getRefreshInterval(), 25_s); // default setting is 25
 
   ConfigSection section;
   section.put("refresh_interval_wrong", 10);
   policy = makePolicy(section);
-  BOOST_CHECK_EQUAL(policy->getRefreshInterval(), time::seconds(25)); // wrong formate
+  BOOST_CHECK_EQUAL(policy->getRefreshInterval(), 25_s); // wrong formate
 
   section.put("refresh_interval", 10);
   policy = makePolicy(section);
-  BOOST_CHECK_EQUAL(policy->getRefreshInterval(), time::seconds(10));
+  BOOST_CHECK_EQUAL(policy->getRefreshInterval(), 10_s);
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestHostToGatewayReadvertisePolicy
diff --git a/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp b/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
index 690a53b..5a64bbe 100644
--- a/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
+++ b/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
@@ -125,7 +125,7 @@
   const Name RIB_REGISTER_COMMAND_PREFIX("/localhost/nlsr/rib/register");
 
   dest.advertise(rr, successCallback, failureCallback);
-  advanceClocks(time::milliseconds(100));
+  advanceClocks(100_ms);
 
   // Retrieve the sent Interest to build the response
   BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 1);
@@ -142,7 +142,7 @@
   auto responseData = makeData(sentInterest.getName());
   responseData->setContent(responsePayload.wireEncode());
   face.receive(*responseData);
-  this->advanceClocks(time::milliseconds(10));
+  this->advanceClocks(10_ms);
 
   scenario.checkCommandOutcome(this);
 }
@@ -203,7 +203,7 @@
   const Name RIB_UNREGISTER_COMMAND_PREFIX("/localhost/nlsr/rib/unregister");
 
   dest.withdraw(rr, successCallback, failureCallback);
-  this->advanceClocks(time::milliseconds(10));
+  this->advanceClocks(10_ms);
 
   // Retrieve the sent Interest to build the response
   BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 1);
@@ -220,7 +220,7 @@
   responseData->setContent(responsePayload.wireEncode());
 
   face.receive(*responseData);
-  this->advanceClocks(time::milliseconds(1));
+  this->advanceClocks(1_ms);
 
   scenario.checkCommandOutcome(this);
 }
@@ -236,13 +236,13 @@
   BOOST_CHECK_EQUAL(dest.isAvailable(), false);
 
   rib.insert(commandPrefix, route);
-  this->advanceClocks(time::milliseconds(100));
+  this->advanceClocks(100_ms);
   BOOST_CHECK_EQUAL(dest.isAvailable(), true);
   BOOST_REQUIRE_EQUAL(availabilityChangeHistory.size(), 1);
   BOOST_CHECK_EQUAL(availabilityChangeHistory.back(), true);
 
   rib.erase(commandPrefix, route);
-  this->advanceClocks(time::milliseconds(100));
+  this->advanceClocks(100_ms);
   BOOST_CHECK_EQUAL(dest.isAvailable(), false);
   BOOST_REQUIRE_EQUAL(availabilityChangeHistory.size(), 2);
   BOOST_CHECK_EQUAL(availabilityChangeHistory.back(), false);
diff --git a/tests/daemon/rib/readvertise/readvertise.t.cpp b/tests/daemon/rib/readvertise/readvertise.t.cpp
index 090bd5a..1988a20 100644
--- a/tests/daemon/rib/readvertise/readvertise.t.cpp
+++ b/tests/daemon/rib/readvertise/readvertise.t.cpp
@@ -133,7 +133,7 @@
     route.faceId = faceId;
     route.origin = origin;
     m_rib.insert(prefix, route);
-    this->advanceClocks(time::milliseconds(6));
+    this->advanceClocks(6_ms);
   }
 
   void
@@ -143,14 +143,14 @@
     route.faceId = faceId;
     route.origin = origin;
     m_rib.erase(prefix, route);
-    this->advanceClocks(time::milliseconds(6));
+    this->advanceClocks(6_ms);
   }
 
   void
   setDestinationAvailability(bool isAvailable)
   {
     destination->setAvailability(isAvailable);
-    this->advanceClocks(time::milliseconds(6));
+    this->advanceClocks(6_ms);
   }
 
 protected:
@@ -181,7 +181,7 @@
 
   // refresh every 60 seconds
   destination->advertiseHistory.clear();
-  this->advanceClocks(time::seconds(61), 5);
+  this->advanceClocks(61_s, 5);
   BOOST_CHECK_EQUAL(destination->advertiseHistory.size(), 5);
 
   // /A is still needed by /A/2 route
@@ -244,7 +244,7 @@
   policy->decision = ReadvertiseAction{"/A", ndn::security::SigningInfo()};
   this->insertRoute("/A/1", 1, ndn::nfd::ROUTE_ORIGIN_CLIENT);
 
-  this->advanceClocks(time::seconds(10), time::seconds(3600));
+  this->advanceClocks(10_s, 1_h);
   BOOST_REQUIRE_GT(destination->advertiseHistory.size(), 2);
 
   // destination->advertise keeps failing, so interval should increase
@@ -260,12 +260,12 @@
   }
 
   destination->shouldSucceed = true;
-  this->advanceClocks(time::seconds(3600));
+  this->advanceClocks(1_h);
   destination->advertiseHistory.clear();
 
   // destination->advertise has succeeded, retry interval should reset to initial
   destination->shouldSucceed = false;
-  this->advanceClocks(time::seconds(10), time::seconds(300));
+  this->advanceClocks(10_s, 300_s);
   BOOST_REQUIRE_GE(destination->advertiseHistory.size(), 2);
   FloatInterval restartInterval = destination->advertiseHistory[1].timestamp -
                                   destination->advertiseHistory[0].timestamp;
@@ -277,7 +277,7 @@
   destination->shouldSucceed = false;
   policy->decision = ReadvertiseAction{"/A", ndn::security::SigningInfo()};
   this->insertRoute("/A/1", 1, ndn::nfd::ROUTE_ORIGIN_CLIENT);
-  this->advanceClocks(time::seconds(10), time::seconds(300));
+  this->advanceClocks(10_s, 300_s);
   BOOST_CHECK_GT(destination->advertiseHistory.size(), 0);
   BOOST_CHECK_EQUAL(destination->withdrawHistory.size(), 0);
 
@@ -285,7 +285,7 @@
   destination->advertiseHistory.clear();
   destination->withdrawHistory.clear();
   this->eraseRoute("/A/1", 1, ndn::nfd::ROUTE_ORIGIN_CLIENT);
-  this->advanceClocks(time::seconds(10), time::seconds(300));
+  this->advanceClocks(10_s, 300_s);
   BOOST_CHECK_EQUAL(destination->advertiseHistory.size(), 0); // don't try to advertise
   BOOST_CHECK_GT(destination->withdrawHistory.size(), 0); // try to withdraw
 
@@ -293,7 +293,7 @@
   destination->advertiseHistory.clear();
   destination->withdrawHistory.clear();
   this->insertRoute("/A/1", 1, ndn::nfd::ROUTE_ORIGIN_CLIENT);
-  this->advanceClocks(time::seconds(10), time::seconds(300));
+  this->advanceClocks(10_s, 300_s);
   BOOST_CHECK_GT(destination->advertiseHistory.size(), 0); // try to advertise
   BOOST_CHECK_EQUAL(destination->withdrawHistory.size(), 0); // don't try to withdraw
 }
