Skip to content

Commit f4ca418

Browse files
committed
total download time
1 parent 2ad6366 commit f4ca418

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libcyphal_demo/src/file_downloader.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,11 @@ class FileDownloader final
275275

276276
void complete()
277277
{
278-
std::cout << "\nDownload completed (err=" << file_stats_.file_error.value << ").\n" << std::flush;
278+
const auto duration = time_provider_.now() - file_stats_.start_time;
279+
const auto duration_ms = std::chrono::duration_cast<std::chrono::milliseconds>(duration).count();
280+
std::cout << "\nDownload completed (err=" << file_stats_.file_error.value //
281+
<< ", time=" << duration_ms << "ms).\n"
282+
<< std::flush;
279283

280284
get_info_promise_.reset();
281285
get_info_client_.reset();

0 commit comments

Comments
 (0)