From 97a2e051420b46fb0309a2f8127ba6a4a687ad22 Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Mon, 17 Jun 2019 08:22:08 +0300
Subject: [PATCH] Debug fps on windows

---
 components/rgbd-sources/src/streamer.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/components/rgbd-sources/src/streamer.cpp b/components/rgbd-sources/src/streamer.cpp
index 9e6935338..d82135df3 100644
--- a/components/rgbd-sources/src/streamer.cpp
+++ b/components/rgbd-sources/src/streamer.cpp
@@ -266,11 +266,15 @@ void Streamer::_schedule() {
 		// Grab job
 		ftl::pool.push([this,src](int id) {
 			//StreamSource *src = sources_[uri];
+			auto start = std::chrono::high_resolution_clock::now();
 			try {
 				src->src->grab();
 			} catch (...) {
 				LOG(ERROR) << "Exception when grabbing frame";
 			}
+			std::chrono::duration<double> elapsed =
+				std::chrono::high_resolution_clock::now() - start;
+			LOG(INFO) << "Grab in " << elapsed.count() << "s";
 
 			// CHECK (Nick) Can state be an atomic instead?
 			//UNIQUE_LOCK(src->mutex, lk);
-- 
GitLab