diff --git a/src/hello-protocol.cpp b/src/hello-protocol.cpp
index 05d121b..41df359 100644
--- a/src/hello-protocol.cpp
+++ b/src/hello-protocol.cpp
@@ -65,7 +65,7 @@
     }
     else {
       registerPrefixes((*it).getName(), (*it).getConnectingFaceUri(),
-                       (*it).getLinkCost(), 31536000);
+                       (*it).getLinkCost(), ndn::time::milliseconds::max());
     }
   }
   scheduleInterest(m_nlsr.getConfParameter().getInfoInterestInterval());
@@ -113,7 +113,7 @@
       }
       else {
         registerPrefixes(adjacent->getName(), adjacent->getConnectingFaceUri(),
-                         adjacent->getLinkCost(), 31536000);
+                         adjacent->getLinkCost(), ndn::time::milliseconds::max());
       }
     }
   }
@@ -208,7 +208,7 @@
 
 void
 HelloProtocol::registerPrefixes(const ndn::Name& adjName, const std::string& faceUri,
-                               double linkCost, uint64_t timeout)
+                               double linkCost, const ndn::time::milliseconds& timeout)
 {
   ndn::Name broadcastKeyPrefix = DEFAULT_BROADCAST_PREFIX;
   broadcastKeyPrefix.append("KEYS");
diff --git a/src/hello-protocol.hpp b/src/hello-protocol.hpp
index 9c6e223..063e6a8 100644
--- a/src/hello-protocol.hpp
+++ b/src/hello-protocol.hpp
@@ -76,7 +76,7 @@
 
   void
   registerPrefixes(const ndn::Name& adjName, const std::string& faceUri,
-                   double linkCost, uint64_t timeout);
+                   double linkCost, const ndn::time::milliseconds& timeout);
 private:
   Nlsr& m_nlsr;
   static const std::string INFO_COMPONENT;
diff --git a/src/route/fib.cpp b/src/route/fib.cpp
index 2f7914a..3cf0b3c 100644
--- a/src/route/fib.cpp
+++ b/src/route/fib.cpp
@@ -82,7 +82,8 @@
       // add entry to NDN-FIB
       if (isPrefixUpdatable(it->getName())) {
         registerPrefix(it->getName(), nhit->getConnectingFaceUri(),
-                       std::ceil(nhit->getRouteCost()), (m_refreshTime + GRACE_PERIOD));
+                       std::ceil(nhit->getRouteCost()),
+                       ndn::time::seconds(m_refreshTime + GRACE_PERIOD));
       }
     }
     // increase sequence number and schedule refresh again
@@ -137,7 +138,8 @@
         //Add entry to NDN-FIB
         if (isPrefixUpdatable(name)) {
           registerPrefix(name, nhit->getConnectingFaceUri(),
-                         std::ceil(nhit->getRouteCost()), (m_refreshTime + GRACE_PERIOD));
+                         std::ceil(nhit->getRouteCost()),
+                         ndn::time::seconds(m_refreshTime + GRACE_PERIOD));
         }
       }
       newEntry.getNexthopList().sort();
@@ -160,7 +162,8 @@
         // Add first Entry to NDN-FIB
         if (isPrefixUpdatable(name)) {
           registerPrefix(name, nhit->getConnectingFaceUri(),
-                         std::ceil(nhit->getRouteCost()), (m_refreshTime + GRACE_PERIOD));
+                         std::ceil(nhit->getRouteCost()),
+                         ndn::time::seconds(m_refreshTime + GRACE_PERIOD));
         }
         removeHop(it->getNexthopList(), nhit->getConnectingFaceUri(), name);
         it->getNexthopList().reset();
@@ -172,7 +175,8 @@
           //Add Entry to NDN_FIB
           if (isPrefixUpdatable(name)) {
             registerPrefix(name, nhit->getConnectingFaceUri(),
-                           std::ceil(nhit->getRouteCost()), (m_refreshTime + GRACE_PERIOD));
+                           std::ceil(nhit->getRouteCost()),
+                           ndn::time::seconds(m_refreshTime + GRACE_PERIOD));
           }
         }
       }
@@ -288,7 +292,7 @@
 
 void
 Fib::registerPrefix(const ndn::Name& namePrefix, const std::string& faceUri,
-                    uint64_t faceCost, uint64_t timeout)
+                    uint64_t faceCost, const ndn::time::milliseconds& timeout)
 {
   createFace(faceUri,
              ndn::bind(&Fib::registerPrefixInNfd, this,_1, namePrefix, faceCost, timeout),
@@ -298,7 +302,8 @@
 void
 Fib::registerPrefix(const ndn::Name& namePrefix,
                     const std::string& faceUri,
-                    uint64_t faceCost, uint64_t timeout,
+                    uint64_t faceCost,
+                    const ndn::time::milliseconds& timeout,
                     const CommandSucceedCallback& onSuccess,
                     const CommandFailCallback& onFailure)
 
@@ -311,14 +316,15 @@
 
 void
 Fib::registerPrefixInNfd(const ndn::nfd::ControlParameters& faceCreateResult, 
-                         const ndn::Name& namePrefix, uint64_t faceCost, uint64_t timeout)
+                         const ndn::Name& namePrefix, uint64_t faceCost,
+                         const ndn::time::milliseconds& timeout)
 {
   ndn::nfd::ControlParameters controlParameters;
   controlParameters
     .setName(namePrefix)
     .setFaceId(faceCreateResult.getFaceId())
     .setCost(faceCost)
-    .setExpirationPeriod(ndn::time::milliseconds(timeout * 1000))
+    .setExpirationPeriod(timeout)
     .setOrigin(128);
   m_controller.start<ndn::nfd::RibRegisterCommand>(controlParameters,
                                                    ndn::bind(&Fib::onRegistration, this, _1,
@@ -330,7 +336,8 @@
 
 void
 Fib::registerPrefixInNfd(const ndn::nfd::ControlParameters& faceCreateResult,
-                         const ndn::Name& namePrefix, uint64_t faceCost, uint64_t timeout,
+                         const ndn::Name& namePrefix, uint64_t faceCost,
+                         const ndn::time::milliseconds& timeout,
                          const CommandSucceedCallback& onSuccess,
                          const CommandFailCallback& onFailure)
 {
@@ -339,7 +346,7 @@
     .setName(namePrefix)
     .setFaceId(faceCreateResult.getFaceId())
     .setCost(faceCost)
-    .setExpirationPeriod(ndn::time::milliseconds(timeout * 1000))
+    .setExpirationPeriod(timeout)
     .setOrigin(128);
   m_controller.start<ndn::nfd::RibRegisterCommand>(controlParameters,
                                                    onSuccess,
diff --git a/src/route/fib.hpp b/src/route/fib.hpp
index 6a23772..5121535 100644
--- a/src/route/fib.hpp
+++ b/src/route/fib.hpp
@@ -93,12 +93,14 @@
 public:
   void
   registerPrefix(const ndn::Name& namePrefix, const std::string& faceUri,
-                 uint64_t faceCost, uint64_t timeout);
+                 uint64_t faceCost,
+                 const ndn::time::milliseconds& timeout);
 
   void
   registerPrefix(const ndn::Name& namePrefix,
                  const std::string& faceUri,
-                 uint64_t faceCost, uint64_t timeout,
+                 uint64_t faceCost,
+                 const ndn::time::milliseconds& timeout,
                  const CommandSucceedCallback& onSuccess,
                  const CommandFailCallback& onFailure);
   
@@ -121,11 +123,13 @@
 
   void
   registerPrefixInNfd(const ndn::nfd::ControlParameters& faceCreateResult,
-                      const ndn::Name& namePrefix, uint64_t faceCost, uint64_t timeout);
+                      const ndn::Name& namePrefix, uint64_t faceCost,
+                      const ndn::time::milliseconds& timeout);
 
   void
   registerPrefixInNfd(const ndn::nfd::ControlParameters& faceCreateResult,
-                      const ndn::Name& namePrefix, uint64_t faceCost, uint64_t timeout,
+                      const ndn::Name& namePrefix, uint64_t faceCost,
+                      const ndn::time::milliseconds& timeout,
                       const CommandSucceedCallback& onSuccess,
                       const CommandFailCallback& onFailure);
 
