diff --git a/tools/peek/ndn-peek.cpp b/tools/peek/ndn-peek.cpp
index 7bc8dae..432042b 100644
--- a/tools/peek/ndn-peek.cpp
+++ b/tools/peek/ndn-peek.cpp
@@ -59,6 +59,7 @@
   explicit
   NdnPeek(char* programName)
     : m_programName(programName)
+    , m_isVerbose(false)
     , m_mustBeFresh(false)
     , m_isChildSelectorRightmost(false)
     , m_minSuffixComponents(-1)
@@ -84,6 +85,7 @@
       "   [-l lifetime] - set InterestLifetime in time::milliseconds\n"
       "   [-p]          - print payload only, not full packet\n"
       "   [-w timeout]  - set Timeout in time::milliseconds\n"
+      "   [-v]          - verbose output\n"
       "   [-h]          - print help and exit\n"
       "   [-V]          - print version and exit\n"
       "\n";
@@ -91,6 +93,12 @@
   }
 
   void
+  setVerbose()
+  {
+    m_isVerbose = true;
+  }
+
+  void
   setMustBeFresh()
   {
     m_mustBeFresh = true;
@@ -182,6 +190,10 @@
     else
       interestPacket.setInterestLifetime(m_interestLifetime);
 
+    if (m_isVerbose) {
+      std::cerr << "INTEREST: " << interestPacket << std::endl;
+    }
+
     return interestPacket;
   }
 
@@ -189,6 +201,13 @@
   onData(const Interest& interest, Data& data)
   {
     m_isDataReceived = true;
+
+    if (m_isVerbose) {
+      std::cerr << "DATA, RTT: "
+                << time::duration_cast<time::milliseconds>(time::steady_clock::now() - m_expressInterestTime).count()
+                << "ms" << std::endl;
+    }
+
     if (m_isPayloadOnlySet) {
       const Block& block = data.getContent();
       std::cout.write(reinterpret_cast<const char*>(block.value()), block.value_size());
@@ -211,19 +230,20 @@
       m_face.expressInterest(createInterestPacket(),
                              bind(&NdnPeek::onData, this, _1, _2),
                              bind(&NdnPeek::onTimeout, this, _1));
+      m_expressInterestTime = time::steady_clock::now();
       if (m_timeout < time::milliseconds::zero()) {
-        if (m_interestLifetime < time::milliseconds::zero())
-          m_face.processEvents(getDefaultInterestLifetime());
-        else
-          m_face.processEvents(m_interestLifetime);
+        m_timeout = m_interestLifetime < time::milliseconds::zero() ?
+                    getDefaultInterestLifetime() : m_interestLifetime;
       }
-      else
-        m_face.processEvents(m_timeout);
+      m_face.processEvents(m_timeout);
     }
     catch (std::exception& e) {
-      std::cerr << "ERROR: " << e.what() << "\n" << std::endl;
+      std::cerr << "ERROR: " << e.what() << std::endl;
       exit(1);
     }
+    if (m_isVerbose && !m_isDataReceived) {
+      std::cerr << "TIMEOUT" << std::endl;
+    }
   }
 
   bool
@@ -234,6 +254,7 @@
 
 private:
   std::string m_programName;
+  bool m_isVerbose;
   bool m_mustBeFresh;
   bool m_isChildSelectorRightmost;
   int m_minSuffixComponents;
@@ -242,6 +263,7 @@
   bool m_isPayloadOnlySet;
   time::milliseconds m_timeout;
   std::string m_prefixName;
+  time::steady_clock::TimePoint m_expressInterestTime;
   bool m_isDataReceived;
   Face m_face;
 };
@@ -251,11 +273,14 @@
 {
   NdnPeek program(argv[0]);
   int option;
-  while ((option = getopt(argc, argv, "hfrm:M:l:pw:V")) != -1) {
+  while ((option = getopt(argc, argv, "hvfrm:M:l:pw:V")) != -1) {
     switch (option) {
     case 'h':
       program.usage();
       break;
+    case 'v':
+      program.setVerbose();
+      break;
     case 'f':
       program.setMustBeFresh();
       break;
