all: Update code to compile with latest time-related changes in ndn-cpp-dev library

Change-Id: I7e859989c833001f49b286d4a9917f4dc740b4a4
diff --git a/daemon/face/ndnlp-partial-message-store.cpp b/daemon/face/ndnlp-partial-message-store.cpp
index 74c109f..e252c84 100644
--- a/daemon/face/ndnlp-partial-message-store.cpp
+++ b/daemon/face/ndnlp-partial-message-store.cpp
@@ -61,7 +61,7 @@
   return Block(buffer);
 }
 
-PartialMessageStore::PartialMessageStore(Scheduler& scheduler, time::Duration idleDuration)
+PartialMessageStore::PartialMessageStore(Scheduler& scheduler, const time::nanoseconds& idleDuration)
   : m_scheduler(scheduler)
   , m_idleDuration(idleDuration)
 {
diff --git a/daemon/face/ndnlp-partial-message-store.hpp b/daemon/face/ndnlp-partial-message-store.hpp
index e5de5b1..7cd3df8 100644
--- a/daemon/face/ndnlp-partial-message-store.hpp
+++ b/daemon/face/ndnlp-partial-message-store.hpp
@@ -53,7 +53,7 @@
 {
 public:
   PartialMessageStore(Scheduler& scheduler,
-    time::Duration idleDuration = time::milliseconds(100));
+    const time::nanoseconds& idleDuration = time::milliseconds(100));
 
   virtual
   ~PartialMessageStore();
@@ -80,7 +80,7 @@
   std::map<uint64_t, shared_ptr<PartialMessage> > m_partialMessages;
 
   Scheduler& m_scheduler;
-  time::Duration m_idleDuration;
+  time::nanoseconds m_idleDuration;
 };
 
 } // namespace ndnlp
diff --git a/daemon/face/tcp-channel.cpp b/daemon/face/tcp-channel.cpp
index 4b46ea9..c27f1df 100644
--- a/daemon/face/tcp-channel.cpp
+++ b/daemon/face/tcp-channel.cpp
@@ -51,7 +51,7 @@
 TcpChannel::connect(const tcp::Endpoint& remoteEndpoint,
                     const TcpChannel::FaceCreatedCallback& onFaceCreated,
                     const TcpChannel::ConnectFailedCallback& onConnectFailed,
-                    const time::Duration& timeout/* = time::seconds(4)*/)
+                    const time::seconds& timeout/* = time::seconds(4)*/)
 {
   ChannelFaceMap::iterator i = m_channelFaces.find(remoteEndpoint);
   if (i != m_channelFaces.end()) {
@@ -62,8 +62,8 @@
   shared_ptr<ip::tcp::socket> clientSocket =
     make_shared<ip::tcp::socket>(boost::ref(getGlobalIoService()));
 
-  shared_ptr<monotonic_deadline_timer> connectTimeoutTimer =
-    make_shared<monotonic_deadline_timer>(boost::ref(getGlobalIoService()));
+  shared_ptr<ndn::monotonic_deadline_timer> connectTimeoutTimer =
+    make_shared<ndn::monotonic_deadline_timer>(boost::ref(getGlobalIoService()));
 
   clientSocket->async_connect(remoteEndpoint,
                               bind(&TcpChannel::handleSuccessfulConnect, this, _1,
@@ -80,13 +80,13 @@
 TcpChannel::connect(const std::string& remoteHost, const std::string& remotePort,
                     const TcpChannel::FaceCreatedCallback& onFaceCreated,
                     const TcpChannel::ConnectFailedCallback& onConnectFailed,
-                    const time::Duration& timeout/* = time::seconds(4)*/)
+                    const time::seconds& timeout/* = time::seconds(4)*/)
 {
   shared_ptr<ip::tcp::socket> clientSocket =
     make_shared<ip::tcp::socket>(boost::ref(getGlobalIoService()));
 
-  shared_ptr<monotonic_deadline_timer> connectTimeoutTimer =
-    make_shared<monotonic_deadline_timer>(boost::ref(getGlobalIoService()));
+  shared_ptr<ndn::monotonic_deadline_timer> connectTimeoutTimer =
+    make_shared<ndn::monotonic_deadline_timer>(boost::ref(getGlobalIoService()));
 
   ip::tcp::resolver::query query(remoteHost, remotePort);
   shared_ptr<ip::tcp::resolver> resolver =
@@ -170,7 +170,7 @@
 void
 TcpChannel::handleSuccessfulConnect(const boost::system::error_code& error,
                                     const shared_ptr<ip::tcp::socket>& socket,
-                                    const shared_ptr<monotonic_deadline_timer>& timer,
+                                    const shared_ptr<ndn::monotonic_deadline_timer>& timer,
                                     const FaceCreatedCallback& onFaceCreated,
                                     const ConnectFailedCallback& onConnectFailed)
 {
@@ -199,7 +199,7 @@
 void
 TcpChannel::handleFailedConnect(const boost::system::error_code& error,
                                 const shared_ptr<ip::tcp::socket>& socket,
-                                const shared_ptr<monotonic_deadline_timer>& timer,
+                                const shared_ptr<ndn::monotonic_deadline_timer>& timer,
                                 const ConnectFailedCallback& onConnectFailed)
 {
   if (error) { // e.g., cancelled
@@ -218,7 +218,7 @@
 TcpChannel::handleEndpointResolution(const boost::system::error_code& error,
                                      ip::tcp::resolver::iterator remoteEndpoint,
                                      const shared_ptr<boost::asio::ip::tcp::socket>& socket,
-                                     const shared_ptr<boost::asio::monotonic_deadline_timer>& timer,
+                                     const shared_ptr<ndn::monotonic_deadline_timer>& timer,
                                      const FaceCreatedCallback& onFaceCreated,
                                      const ConnectFailedCallback& onConnectFailed,
                                      const shared_ptr<ip::tcp::resolver>& resolver)
diff --git a/daemon/face/tcp-channel.hpp b/daemon/face/tcp-channel.hpp
index 808d0f1..61a9c05 100644
--- a/daemon/face/tcp-channel.hpp
+++ b/daemon/face/tcp-channel.hpp
@@ -8,7 +8,6 @@
 #define NFD_FACE_TCP_CHANNEL_HPP
 
 #include "channel.hpp"
-#include "core/time.hpp"
 #include <ndn-cpp-dev/util/monotonic_deadline_timer.hpp>
 #include "tcp-face.hpp"
 
@@ -61,7 +60,7 @@
   connect(const tcp::Endpoint& remoteEndpoint,
           const FaceCreatedCallback& onFaceCreated,
           const ConnectFailedCallback& onConnectFailed,
-          const time::Duration& timeout = time::seconds(4));
+          const time::seconds& timeout = time::seconds(4));
 
   /**
    * \brief Create a face by establishing connection to the specified
@@ -78,7 +77,7 @@
   connect(const std::string& remoteHost, const std::string& remotePort,
           const FaceCreatedCallback& onFaceCreated,
           const ConnectFailedCallback& onConnectFailed,
-          const time::Duration& timeout = time::seconds(4));
+          const time::seconds& timeout = time::seconds(4));
 
   /**
    * \brief Get number of faces in the channel
@@ -103,21 +102,21 @@
   void
   handleSuccessfulConnect(const boost::system::error_code& error,
                           const shared_ptr<boost::asio::ip::tcp::socket>& socket,
-                          const shared_ptr<boost::asio::monotonic_deadline_timer>& timer,
+                          const shared_ptr<ndn::monotonic_deadline_timer>& timer,
                           const FaceCreatedCallback& onFaceCreated,
                           const ConnectFailedCallback& onConnectFailed);
 
   void
   handleFailedConnect(const boost::system::error_code& error,
                       const shared_ptr<boost::asio::ip::tcp::socket>& socket,
-                      const shared_ptr<boost::asio::monotonic_deadline_timer>& timer,
+                      const shared_ptr<ndn::monotonic_deadline_timer>& timer,
                       const ConnectFailedCallback& onConnectFailed);
 
   void
   handleEndpointResolution(const boost::system::error_code& error,
                            boost::asio::ip::tcp::resolver::iterator remoteEndpoint,
                            const shared_ptr<boost::asio::ip::tcp::socket>& socket,
-                           const shared_ptr<boost::asio::monotonic_deadline_timer>& timer,
+                           const shared_ptr<ndn::monotonic_deadline_timer>& timer,
                            const FaceCreatedCallback& onFaceCreated,
                            const ConnectFailedCallback& onConnectFailed,
                            const shared_ptr<boost::asio::ip::tcp::resolver>& resolver);
diff --git a/daemon/face/udp-channel.cpp b/daemon/face/udp-channel.cpp
index a9e24f7..9151830 100644
--- a/daemon/face/udp-channel.cpp
+++ b/daemon/face/udp-channel.cpp
@@ -15,7 +15,7 @@
 using namespace boost::asio;
 
 UdpChannel::UdpChannel(const udp::Endpoint& localEndpoint,
-                       const time::Duration& timeout)
+                       const time::seconds& timeout)
   : m_localEndpoint(localEndpoint)
   , m_isListening(false)
   , m_idleFaceTimeout(timeout)
diff --git a/daemon/face/udp-channel.hpp b/daemon/face/udp-channel.hpp
index 81e53ac..26c6cae 100644
--- a/daemon/face/udp-channel.hpp
+++ b/daemon/face/udp-channel.hpp
@@ -8,7 +8,6 @@
 #define NFD_FACE_UDP_CHANNEL_HPP
 
 #include "channel.hpp"
-#include "core/time.hpp"
 #include "core/global-io.hpp"
 #include "core/scheduler.hpp"
 #include "udp-face.hpp"
@@ -46,7 +45,7 @@
    * \throw UdpChannel::Error if bind on the socket fails
    */
   UdpChannel(const udp::Endpoint& localEndpoint,
-             const time::Duration& timeout);
+             const time::seconds& timeout);
 
   virtual
   ~UdpChannel();
@@ -156,7 +155,7 @@
    * \brief every time m_idleFaceTimeout expires all the idle (and not permanent)
    *        faces will be removed
    */
-  time::Duration m_idleFaceTimeout;
+  time::seconds m_idleFaceTimeout;
 
   EventId m_closeIdleFaceEvent;
 
diff --git a/daemon/face/udp-factory.cpp b/daemon/face/udp-factory.cpp
index a311d81..5fcfd1c 100644
--- a/daemon/face/udp-factory.cpp
+++ b/daemon/face/udp-factory.cpp
@@ -21,7 +21,7 @@
 
 shared_ptr<UdpChannel>
 UdpFactory::createChannel(const udp::Endpoint& endpoint,
-                          const time::Duration& timeout)
+                          const time::seconds& timeout)
 {
   NFD_LOG_DEBUG("Creating unicast " << endpoint);
   
@@ -52,7 +52,7 @@
 shared_ptr<UdpChannel>
 UdpFactory::createChannel(const std::string& localHost,
                           const std::string& localPort,
-                          const time::Duration& timeout)
+                          const time::seconds& timeout)
 {
   return createChannel(UdpResolver::syncResolve(localHost, localPort),
                        timeout);
diff --git a/daemon/face/udp-factory.hpp b/daemon/face/udp-factory.hpp
index 695d1e5..969ef8c 100644
--- a/daemon/face/udp-factory.hpp
+++ b/daemon/face/udp-factory.hpp
@@ -56,7 +56,7 @@
    */
   shared_ptr<UdpChannel>
   createChannel(const udp::Endpoint& localEndpoint,
-         const time::Duration& timeout = time::seconds(600));
+         const time::seconds& timeout = time::seconds(600));
 
   /**
    * \brief Create UDP-based channel using specified host and port number
@@ -81,7 +81,7 @@
   shared_ptr<UdpChannel>
   createChannel(const std::string& localHost,
          const std::string& localPort,
-         const time::Duration& timeout = time::seconds(600));
+         const time::seconds& timeout = time::seconds(600));
 
   /**
    * \brief Create MulticastUdpFace using udp::Endpoint