diff --git a/daemon/fw/asf-probing-module.cpp b/daemon/fw/asf-probing-module.cpp
index 99449cd..485a3e9 100644
--- a/daemon/fw/asf-probing-module.cpp
+++ b/daemon/fw/asf-probing-module.cpp
@@ -24,11 +24,8 @@
  */
 
 #include "asf-probing-module.hpp"
-
 #include "core/random.hpp"
 
-#include <boost/random/uniform_real_distribution.hpp>
-
 namespace nfd {
 namespace fw {
 namespace asf {
@@ -186,8 +183,8 @@
 double
 ProbingModule::getRandomNumber(double start, double end)
 {
-  boost::random::uniform_real_distribution<double> distribution(start, end);
-  return distribution(getGlobalRng());
+  std::uniform_real_distribution<double> dist(start, end);
+  return dist(getGlobalRng());
 }
 
 } // namespace asf
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 9ef3c75..b8bd076 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -30,7 +30,6 @@
 #include "strategy.hpp"
 #include "table/cleanup.hpp"
 #include <ndn-cxx/lp/tags.hpp>
-#include <boost/random/uniform_int_distribution.hpp>
 
 namespace nfd {
 
@@ -270,7 +269,7 @@
 
   if (wantNewNonce) {
     interest = make_shared<Interest>(*interest);
-    static boost::random::uniform_int_distribution<uint32_t> dist;
+    static std::uniform_int_distribution<uint32_t> dist;
     interest->setNonce(dist(getGlobalRng()));
   }
 
diff --git a/daemon/fw/ncc-strategy.cpp b/daemon/fw/ncc-strategy.cpp
index f1a888a..d191326 100644
--- a/daemon/fw/ncc-strategy.cpp
+++ b/daemon/fw/ncc-strategy.cpp
@@ -26,7 +26,6 @@
 #include "ncc-strategy.hpp"
 #include "pit-algorithm.hpp"
 #include "core/random.hpp"
-#include <boost/random/uniform_int_distribution.hpp>
 
 namespace nfd {
 namespace fw {
@@ -143,8 +142,7 @@
   }
 
   if (isForwarded) {
-    boost::random::uniform_int_distribution<time::nanoseconds::rep> dist(0,
-      pitEntryInfo->maxInterval.count() - 1);
+    std::uniform_int_distribution<time::nanoseconds::rep> dist(0, pitEntryInfo->maxInterval.count() - 1);
     time::nanoseconds deferNext = time::nanoseconds(dist(getGlobalRng()));
     pitEntryInfo->propagateTimer = scheduler::schedule(deferNext,
       bind(&NccStrategy::doPropagate, this, weak_ptr<pit::Entry>(pitEntry)));
@@ -239,13 +237,9 @@
   return *info;
 }
 
-
-const time::microseconds NccStrategy::MeasurementsEntryInfo::INITIAL_PREDICTION =
-                                                             time::microseconds(8192);
-const time::microseconds NccStrategy::MeasurementsEntryInfo::MIN_PREDICTION =
-                                                             time::microseconds(127);
-const time::microseconds NccStrategy::MeasurementsEntryInfo::MAX_PREDICTION =
-                                                             time::microseconds(160000);
+const time::microseconds NccStrategy::MeasurementsEntryInfo::INITIAL_PREDICTION = time::microseconds(8192);
+const time::microseconds NccStrategy::MeasurementsEntryInfo::MIN_PREDICTION = time::microseconds(127);
+const time::microseconds NccStrategy::MeasurementsEntryInfo::MAX_PREDICTION = time::milliseconds(160);
 
 NccStrategy::MeasurementsEntryInfo::MeasurementsEntryInfo()
   : prediction(INITIAL_PREDICTION)
@@ -259,7 +253,8 @@
 }
 
 shared_ptr<Face>
-NccStrategy::MeasurementsEntryInfo::getBestFace(void) {
+NccStrategy::MeasurementsEntryInfo::getBestFace()
+{
   shared_ptr<Face> best = this->bestFace.lock();
   if (best != nullptr) {
     return best;
@@ -269,7 +264,8 @@
 }
 
 void
-NccStrategy::MeasurementsEntryInfo::updateBestFace(const Face& face) {
+NccStrategy::MeasurementsEntryInfo::updateBestFace(const Face& face)
+{
   if (this->bestFace.expired()) {
     this->bestFace = const_cast<Face&>(face).shared_from_this();
     return;
@@ -285,19 +281,22 @@
 }
 
 void
-NccStrategy::MeasurementsEntryInfo::adjustPredictDown() {
+NccStrategy::MeasurementsEntryInfo::adjustPredictDown()
+{
   prediction = std::max(MIN_PREDICTION,
     time::microseconds(prediction.count() - (prediction.count() >> ADJUST_PREDICT_DOWN_SHIFT)));
 }
 
 void
-NccStrategy::MeasurementsEntryInfo::adjustPredictUp() {
+NccStrategy::MeasurementsEntryInfo::adjustPredictUp()
+{
   prediction = std::min(MAX_PREDICTION,
     time::microseconds(prediction.count() + (prediction.count() >> ADJUST_PREDICT_UP_SHIFT)));
 }
 
 void
-NccStrategy::MeasurementsEntryInfo::ageBestFace() {
+NccStrategy::MeasurementsEntryInfo::ageBestFace()
+{
   this->previousFace = this->bestFace;
   this->bestFace.reset();
 }
