summaryrefslogtreecommitdiff
path: root/src/DownloadCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-08-14 14:51:08 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-08-14 14:51:08 +0000
commit6aa98f9b9fdf48933b09952f037329ef63d0d8da (patch)
tree1ff2408f4e2fbb3b6eb9ba342f295aeb71e2021d /src/DownloadCommand.cc
parentc14c80276a587edd34462aa3544f43360b2e426d (diff)
2007-08-10 Ross Smith II <aria2spam at smithii dot com>
Move sleep functions to Util class: * src/Util.cc (sleep): New function. (usleep): New function. * src/DownloadCommand.cc: sleep -> Util::sleep * test/TimeSeedCriteriaTest.cc: sleep -> Util::sleep MinGW build enhancements. The following files are added: * src/timegm.{c,h} Changes to support the above new files: * configure.ac * src/Makefile.am * src/a2time.h * src/Util.cc: * src/strptime.c: Added support for %Z option. Miscellenous build fixes/enhancements. * configure.ac: Added summary report. * src/Platform.h: Tweaked #include's. * src/a2netcompat.h: Tweaked #include's. * src/strptime.h: Tweaked #include's. * src/gai_strerror.c: Tweaked #include's. * src/gai_strerror.h: _D_GETADDRINFO_H -> _D_GAI_STRERROR_H * src/getaddrinfo.h: Moved #ifndef __MINGW32__ * src/gettimeofday.h: Added HAVE_CONFIG_H
Diffstat (limited to 'src/DownloadCommand.cc')
-rw-r--r--src/DownloadCommand.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/DownloadCommand.cc b/src/DownloadCommand.cc
index 9a19b0fa..2de238d6 100644
--- a/src/DownloadCommand.cc
+++ b/src/DownloadCommand.cc
@@ -71,11 +71,7 @@ bool DownloadCommand::executeInternal() {
// TODO we need to specify the sum of all segmentMan's download speed here.
if(maxDownloadSpeedLimit > 0 &&
maxDownloadSpeedLimit < _requestGroup->getSegmentMan()->calculateDownloadSpeed()) {
-#ifdef HAVE_USLEEP
- usleep(1);
-#else
- _sleep(1);
-#endif // HAVE_USLEEP
+ Util::usleep(1);
e->commands.push_back(this);
return false;
}