Skip to content

Commit

Permalink
total download time
Browse files Browse the repository at this point in the history
  • Loading branch information
serges147 committed Jan 31, 2025
1 parent 2ad6366 commit f4ca418
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libcyphal_demo/src/file_downloader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,11 @@ class FileDownloader final

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

get_info_promise_.reset();
get_info_client_.reset();
Expand Down

0 comments on commit f4ca418

Please sign in to comment.