diff --git a/tools/peek/ndnpeek/main.cpp b/tools/peek/ndnpeek/main.cpp
index ead3d70..70977aa 100644
--- a/tools/peek/ndnpeek/main.cpp
+++ b/tools/peek/ndnpeek/main.cpp
@@ -54,8 +54,9 @@
   po::options_description genericOptDesc("Generic options");
   genericOptDesc.add_options()
     ("help,h",    "print help and exit")
-    ("payload,p", po::bool_switch(&options.wantPayloadOnly), "print payload only, instead of full packet")
-    ("timeout,w", po::value<int>(), "set timeout (in milliseconds)")
+    ("payload,p", po::bool_switch(&options.wantPayloadOnly),
+                  "print payload only, instead of full packet")
+    ("timeout,w", po::value<time::milliseconds::rep>(), "execution timeout, in milliseconds")
     ("verbose,v", po::bool_switch(&options.isVerbose), "turn on verbose output")
     ("version,V", "print version and exit")
   ;
@@ -65,7 +66,8 @@
     ("prefix,P",   po::bool_switch(&options.canBePrefix), "set CanBePrefix")
     ("fresh,f",    po::bool_switch(&options.mustBeFresh), "set MustBeFresh")
     ("link-file",  po::value<std::string>(), "set ForwardingHint from a file")
-    ("lifetime,l", po::value<int>(), "set InterestLifetime (in milliseconds)")
+    ("lifetime,l", po::value<time::milliseconds::rep>()->default_value(options.interestLifetime.count()),
+                   "set InterestLifetime, in milliseconds")
   ;
 
   po::options_description visibleOptDesc;
@@ -115,21 +117,15 @@
     return 2;
   }
 
-  if (vm.count("lifetime") > 0) {
-    if (vm["lifetime"].as<int>() >= 0) {
-      options.interestLifetime = time::milliseconds(vm["lifetime"].as<int>());
-    }
-    else {
-      std::cerr << "ERROR: lifetime cannot be negative" << std::endl;
-      return 2;
-    }
+  options.interestLifetime = time::milliseconds(vm["lifetime"].as<time::milliseconds::rep>());
+  if (options.interestLifetime < 0_ms) {
+    std::cerr << "ERROR: lifetime cannot be negative" << std::endl;
+    return 2;
   }
 
   if (vm.count("timeout") > 0) {
-    if (vm["timeout"].as<int>() >= 0) {
-      options.timeout = time::milliseconds(vm["timeout"].as<int>());
-    }
-    else {
+    options.timeout = time::milliseconds(vm["timeout"].as<time::milliseconds::rep>());
+    if (*options.timeout < 0_ms) {
       std::cerr << "ERROR: timeout cannot be negative" << std::endl;
       return 2;
     }
diff --git a/tools/peek/ndnpeek/ndnpeek.cpp b/tools/peek/ndnpeek/ndnpeek.cpp
index 8969216..ff7f7a0 100644
--- a/tools/peek/ndnpeek/ndnpeek.cpp
+++ b/tools/peek/ndnpeek/ndnpeek.cpp
@@ -62,12 +62,10 @@
   Interest interest(m_options.name);
   interest.setCanBePrefix(m_options.canBePrefix);
   interest.setMustBeFresh(m_options.mustBeFresh);
+  interest.setInterestLifetime(m_options.interestLifetime);
   if (m_options.link) {
     interest.setForwardingHint(m_options.link->getDelegationList());
   }
-  if (m_options.interestLifetime) {
-    interest.setInterestLifetime(*m_options.interestLifetime);
-  }
 
   if (m_options.isVerbose) {
     std::cerr << "INTEREST: " << interest << std::endl;
diff --git a/tools/peek/ndnpeek/ndnpeek.hpp b/tools/peek/ndnpeek/ndnpeek.hpp
index 0a9f503..d02155f 100644
--- a/tools/peek/ndnpeek/ndnpeek.hpp
+++ b/tools/peek/ndnpeek/ndnpeek.hpp
@@ -47,9 +47,9 @@
   bool canBePrefix = false;
   bool mustBeFresh = false;
   shared_ptr<Link> link;
-  optional<time::milliseconds> interestLifetime;
+  time::milliseconds interestLifetime = DEFAULT_INTEREST_LIFETIME;
 
-  // output behavior options
+  // program behavior options
   bool isVerbose = false;
   bool wantPayloadOnly = false;
   optional<time::milliseconds> timeout;
diff --git a/tools/peek/ndnpoke/main.cpp b/tools/peek/ndnpoke/main.cpp
index 913b0a8..4e8713a 100644
--- a/tools/peek/ndnpoke/main.cpp
+++ b/tools/peek/ndnpoke/main.cpp
@@ -55,7 +55,7 @@
     ("help,h",        "print help and exit")
     ("unsolicited,u", po::bool_switch(&options.wantUnsolicited),
                       "send the Data packet without waiting for an incoming Interest")
-    ("timeout,w",     po::value<time::milliseconds::rep>(), "set timeout (in milliseconds)")
+    ("timeout,w",     po::value<time::milliseconds::rep>(), "execution timeout, in milliseconds")
     ("verbose,v",     po::bool_switch(&options.isVerbose), "turn on verbose output")
     ("version,V",     "print version and exit")
   ;
@@ -65,7 +65,7 @@
     ("final,F",     po::bool_switch(&options.wantFinalBlockId),
                     "set FinalBlockId to the last component of the Data name")
     ("freshness,x", po::value<time::milliseconds::rep>()->default_value(options.freshnessPeriod.count()),
-                    "set FreshnessPeriod (in milliseconds)")
+                    "set FreshnessPeriod, in milliseconds")
     ("identity,i",  po::value<std::string>(), "use the specified identity for signing")
     ("digest,D",    po::bool_switch(&wantDigestSha256),
                     "use DigestSha256 signing method instead of SignatureSha256WithRsa")
@@ -134,13 +134,10 @@
     return 2;
   }
 
-  if (vm.count("freshness") > 0) {
-    auto freshness = vm["freshness"].as<time::milliseconds::rep>();
-    if (freshness < 0) {
-      std::cerr << "ERROR: freshness cannot be negative" << std::endl;
-      return 2;
-    }
-    options.freshnessPeriod = time::milliseconds(freshness);
+  options.freshnessPeriod = time::milliseconds(vm["freshness"].as<time::milliseconds::rep>());
+  if (options.freshnessPeriod < 0_ms) {
+    std::cerr << "ERROR: freshness cannot be negative" << std::endl;
+    return 2;
   }
 
   if (vm.count("identity") > 0) {
@@ -166,12 +163,11 @@
       std::cerr << "ERROR: conflicting '--unsolicited' and '--timeout' options specified" << std::endl;
       return 2;
     }
-    auto timeout = vm["timeout"].as<time::milliseconds::rep>();
-    if (timeout < 0) {
+    options.timeout = time::milliseconds(vm["timeout"].as<time::milliseconds::rep>());
+    if (*options.timeout < 0_ms) {
       std::cerr << "ERROR: timeout cannot be negative" << std::endl;
       return 2;
     }
-    options.timeout = time::milliseconds(timeout);
   }
 
   try {
