Skip to content

Commit adc300f

Browse files
committed
Removing boost chrono dependency
1 parent e04d78f commit adc300f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ set(Boost_USE_STATIC_LIBS ${USE_STATIC_BOOST})
563563
set(Boost_USE_MULTITHREADED ON)
564564
unset(Boost_INCLUDE_DIR CACHE)
565565
unset(Boost_LIBRARY_DIRS CACHE)
566-
find_package(Boost REQUIRED COMPONENTS thread chrono system)
566+
find_package(Boost REQUIRED COMPONENTS thread system)
567567

568568
if(USE_STATIC_BOOST)
569569
message(STATUS "Linking against boost static libraries")

main/Helper.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#include "../main/localtime_r.h"
1515
#include <sstream>
1616
#include <openssl/md5.h>
17+
#include <chrono>
18+
#include <thread>
1719

1820
#if defined WIN32
1921
#include "../msbuild/WindowsHelper.h"
@@ -435,12 +437,12 @@ bool isInt(const std::string &s)
435437

436438
void sleep_seconds(const long seconds)
437439
{
438-
boost::this_thread::sleep_for(boost::chrono::seconds(seconds));
440+
std::this_thread::sleep_for(std::chrono::seconds(seconds));
439441
}
440442

441443
void sleep_milliseconds(const long milliseconds)
442444
{
443-
boost::this_thread::sleep_for(boost::chrono::milliseconds(milliseconds));
445+
std::this_thread::sleep_for(std::chrono::milliseconds(milliseconds));
444446
}
445447

446448
int createdir(const char *szDirName, int secattr)

0 commit comments

Comments
 (0)