From dc281f467e0fffe30813bce10a2c87a2a42ea1ce Mon Sep 17 00:00:00 2001 From: "A. Samy" Date: Sat, 28 Nov 2015 18:53:09 +0000 Subject: [PATCH] cleanup --- README.md | 1 + main.cpp | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ae67e19..e81a5e4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # CTorrent CTorrent is a torrent client written in C++11 with some help from Boost. +![img](https://i.imgur.com/WcjjLG5.png) ## Requirements diff --git a/main.cpp b/main.cpp index cf81eb1..70e3177 100644 --- a/main.cpp +++ b/main.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -223,17 +224,13 @@ int main(int argc, char *argv[]) } if (!nodownload && started > 0) { - int last = 0; while (completed != total - errors) { if (errors == total) break; Connection::poll(); print_all_stats(torrents, total); - if (last == completed) - continue; - - last = completed; + std::this_thread::sleep_for(std::chrono::milliseconds(5)); } } @@ -241,6 +238,7 @@ int main(int argc, char *argv[]) while (eseed != total) { Connection::poll(); print_all_stats(torrents, total); + std::this_thread::sleep_for(std::chrono::milliseconds(10)); } }