From 6aa98f9b9fdf48933b09952f037329ef63d0d8da Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 14 Aug 2007 14:51:08 +0000 Subject: 2007-08-10 Ross Smith II 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 --- src/DownloadCommand.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/DownloadCommand.cc') 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; } -- cgit