all: Update code to compile with latest time-related changes in ndn-cpp-dev library
Change-Id: I7e859989c833001f49b286d4a9917f4dc740b4a4
diff --git a/daemon/table/pit-face-record.cpp b/daemon/table/pit-face-record.cpp
index 5663dce..4d611f9 100644
--- a/daemon/table/pit-face-record.cpp
+++ b/daemon/table/pit-face-record.cpp
@@ -12,8 +12,8 @@
FaceRecord::FaceRecord(shared_ptr<Face> face)
: m_face(face)
, m_lastNonce(0)
- , m_lastRenewed(0)
- , m_expiry(0)
+ , m_lastRenewed(time::steady_clock::TimePoint::min())
+ , m_expiry(time::steady_clock::TimePoint::min())
{
}
@@ -29,11 +29,11 @@
FaceRecord::update(const Interest& interest)
{
m_lastNonce = interest.getNonce();
- m_lastRenewed = time::now();
+ m_lastRenewed = time::steady_clock::now();
- const ndn::Milliseconds DEFAULT_INTEREST_LIFETIME = static_cast<ndn::Milliseconds>(4000);
- ndn::Milliseconds lifetime = interest.getInterestLifetime();
- if (lifetime < 0) {
+ static const time::milliseconds DEFAULT_INTEREST_LIFETIME = time::milliseconds(4000);
+ time::milliseconds lifetime = interest.getInterestLifetime();
+ if (lifetime < time::milliseconds::zero()) {
lifetime = DEFAULT_INTEREST_LIFETIME;
}
m_expiry = m_lastRenewed + time::milliseconds(lifetime);