1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-09-19 04:28:00 -05:00

Initial commit

This commit is contained in:
Crimson-Hawk
2024-03-05 16:42:40 +08:00
commit f1e4595ebf
39576 changed files with 7006612 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
set(VCPKG_DETECTED_CMAKE_CROSSCOMPILING "OFF")
set(VCPKG_DETECTED_CMAKE_SYSTEM_NAME "Windows")
set(VCPKG_DETECTED_CMAKE_HOST_SYSTEM_NAME "Windows")
set(VCPKG_DETECTED_CMAKE_SYSTEM_PROCESSOR "AMD64")
set(VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR "AMD64")
set(VCPKG_DETECTED_CMAKE_SIZEOF_VOID_P "8")
set(VCPKG_DETECTED_MSVC "1")
set(VCPKG_DETECTED_MSVC_VERSION "1929")
set(VCPKG_DETECTED_CMAKE_AR "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/lib.exe")
set(VCPKG_DETECTED_CMAKE_RANLIB ":")
set(VCPKG_DETECTED_CMAKE_STRIP "")
set(VCPKG_DETECTED_CMAKE_NM "")
set(VCPKG_DETECTED_CMAKE_OBJDUMP "")
set(VCPKG_DETECTED_CMAKE_DLLTOOL "")
set(VCPKG_DETECTED_CMAKE_MT "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/mt.exe")
set(VCPKG_DETECTED_CMAKE_LINKER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/link.exe")
set(VCPKG_DETECTED_CMAKE_C_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe")
set(VCPKG_DETECTED_CMAKE_C_COMPILER_ID "MSVC")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID "MSVC")
set(VCPKG_DETECTED_CMAKE_RC_COMPILER "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/rc.exe")
set(VCPKG_DETECTED_CMAKE_RC_COMPILER_ID "")
set(VCPKG_DETECTED_CMAKE_C_STANDARD_INCLUDE_DIRECTORIES "")
set(VCPKG_DETECTED_CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
set(VCPKG_DETECTED_CMAKE_C_STANDARD "")
set(VCPKG_DETECTED_CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17")
set(VCPKG_DETECTED_CMAKE_C_EXTENSION "")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES "")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD "")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23")
set(VCPKG_DETECTED_CMAKE_CXX_EXTENSION "")
set(VCPKG_DETECTED_CMAKE_C_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ")
set(VCPKG_DETECTED_CMAKE_CXX_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ")
set(VCPKG_DETECTED_CMAKE_RC_FLAGS "-c65001 /DWIN32")
set(VCPKG_DETECTED_CMAKE_SHARED_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_CMAKE_STATIC_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_CMAKE_EXE_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_ENV_PATH "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE//Extensions/Microsoft/IntelliCode/CLI;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/VCPackages;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/MSBuild/Current/bin/Roslyn;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Team Tools/Performance Tools/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Team Tools/Performance Tools;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019//x64;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019/;C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/x64/;C:/Program Files (x86)/HTML Help Workshop;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/Tools/devinit;C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64;C:/Program Files (x86)/Windows Kits/10/bin/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise//MSBuild/Current/Bin;C:/Windows/Microsoft.NET/Framework64/v4.0.30319;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/Tools/;C:/Program Files/PowerShell/7;C:/Windows/system32;C:/Windows;C:/Windows/system32/Wbem;C:/Windows/system32/WindowsPowerShell/v1.0/;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/Llvm/x64/bin;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/Linux/bin/ConnectionManagerExe;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja")
set(VCPKG_DETECTED_ENV_INCLUDE "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/include;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/include;C:/Program Files (x86)/Windows Kits/NETFXSDK/4.8/include/um;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/ucrt;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/shared;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/um;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/winrt;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/cppwinrt")
set(VCPKG_DETECTED_ENV_C_INCLUDE_PATH "")
set(VCPKG_DETECTED_ENV_CPLUS_INCLUDE_PATH "")
set(VCPKG_DETECTED_ENV_LIB "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x64;C:/Program Files (x86)/Windows Kits/NETFXSDK/4.8/lib/um/x64;C:/Program Files (x86)/Windows Kits/10/lib/10.0.22000.0/ucrt/x64;C:/Program Files (x86)/Windows Kits/10/lib/10.0.22000.0/um/x64")
set(VCPKG_DETECTED_ENV_LIBPATH "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x86/store/references;C:/Program Files (x86)/Windows Kits/10/UnionMetadata/10.0.22000.0;C:/Program Files (x86)/Windows Kits/10/References/10.0.22000.0;C:/Windows/Microsoft.NET/Framework64/v4.0.30319")
set(VCPKG_DETECTED_ENV_LIBRARY_PATH "")
set(VCPKG_DETECTED_ENV_LD_LIBRARY_PATH "")
set(VCPKG_COMBINED_CXX_FLAGS_DEBUG " -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1 ")
set(VCPKG_COMBINED_C_FLAGS_DEBUG " -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -MP -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1 ")
set(VCPKG_COMBINED_SHARED_LINKER_FLAGS_DEBUG "-machine:x64 -nologo -debug -INCREMENTAL ")
set(VCPKG_COMBINED_EXE_LINKER_FLAGS_DEBUG "-machine:x64 -nologo -debug -INCREMENTAL ")
set(VCPKG_COMBINED_STATIC_LINKER_FLAGS_DEBUG "-machine:x64 -nologo")
set(VCPKG_COMBINED_RC_FLAGS_DEBUG "-c65001 -DWIN32 -D_DEBUG")

View File

@@ -0,0 +1,50 @@
[1/2] cmd /c "cd .. && "C:/Program Files/CMake/bin/cmake.exe" "D:/a/1/s/build/vcpkg_installed/x64-windows/share/vcpkg-cmake-get-vars/cmake_get_vars" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=D:/a/1/s/externals/vcpkg/packages/boost-chrono_x64-windows" "-DCMAKE_MAKE_PROGRAM=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/a/1/s/externals/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-DVCPKG_OUTPUT_FILE:PATH=D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/cmake-get-vars-x64-windows-rel.cmake.log""
-- The C compiler identification is MSVC 19.29.30146.0
-- The CXX compiler identification is MSVC 19.29.30146.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_SHARED_LIBS
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_LIBDIR
_VCPKG_ROOT_DIR
-- Build files have been written to: D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel
[2/2] cmd /c "cd ../../x64-windows-dbg && "C:/Program Files/CMake/bin/cmake.exe" "D:/a/1/s/build/vcpkg_installed/x64-windows/share/vcpkg-cmake-get-vars/cmake_get_vars" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=D:/a/1/s/externals/vcpkg/packages/boost-chrono_x64-windows/debug" "-DCMAKE_MAKE_PROGRAM=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/a/1/s/externals/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF" "-DVCPKG_OUTPUT_FILE:PATH=D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/cmake-get-vars-x64-windows-dbg.cmake.log""
-- The C compiler identification is MSVC 19.29.30146.0
-- The CXX compiler identification is MSVC 19.29.30146.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_SHARED_LIBS
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_LIBDIR
_VCPKG_ROOT_DIR
-- Build files have been written to: D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg

View File

@@ -0,0 +1,52 @@
set(VCPKG_DETECTED_CMAKE_CROSSCOMPILING "OFF")
set(VCPKG_DETECTED_CMAKE_SYSTEM_NAME "Windows")
set(VCPKG_DETECTED_CMAKE_HOST_SYSTEM_NAME "Windows")
set(VCPKG_DETECTED_CMAKE_SYSTEM_PROCESSOR "AMD64")
set(VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR "AMD64")
set(VCPKG_DETECTED_CMAKE_SIZEOF_VOID_P "8")
set(VCPKG_DETECTED_MSVC "1")
set(VCPKG_DETECTED_MSVC_VERSION "1929")
set(VCPKG_DETECTED_CMAKE_AR "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/lib.exe")
set(VCPKG_DETECTED_CMAKE_RANLIB ":")
set(VCPKG_DETECTED_CMAKE_STRIP "")
set(VCPKG_DETECTED_CMAKE_NM "")
set(VCPKG_DETECTED_CMAKE_OBJDUMP "")
set(VCPKG_DETECTED_CMAKE_DLLTOOL "")
set(VCPKG_DETECTED_CMAKE_MT "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/mt.exe")
set(VCPKG_DETECTED_CMAKE_LINKER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/link.exe")
set(VCPKG_DETECTED_CMAKE_C_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe")
set(VCPKG_DETECTED_CMAKE_C_COMPILER_ID "MSVC")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID "MSVC")
set(VCPKG_DETECTED_CMAKE_RC_COMPILER "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/rc.exe")
set(VCPKG_DETECTED_CMAKE_RC_COMPILER_ID "")
set(VCPKG_DETECTED_CMAKE_C_STANDARD_INCLUDE_DIRECTORIES "")
set(VCPKG_DETECTED_CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
set(VCPKG_DETECTED_CMAKE_C_STANDARD "")
set(VCPKG_DETECTED_CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17")
set(VCPKG_DETECTED_CMAKE_C_EXTENSION "")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES "")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
set(VCPKG_DETECTED_CMAKE_CXX_STANDARD "")
set(VCPKG_DETECTED_CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23")
set(VCPKG_DETECTED_CMAKE_CXX_EXTENSION "")
set(VCPKG_DETECTED_CMAKE_C_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ")
set(VCPKG_DETECTED_CMAKE_CXX_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ")
set(VCPKG_DETECTED_CMAKE_RC_FLAGS "-c65001 /DWIN32")
set(VCPKG_DETECTED_CMAKE_SHARED_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_CMAKE_STATIC_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_CMAKE_EXE_LINKER_FLAGS "/machine:x64")
set(VCPKG_DETECTED_ENV_PATH "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE//Extensions/Microsoft/IntelliCode/CLI;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/VCPackages;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/MSBuild/Current/bin/Roslyn;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Team Tools/Performance Tools/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Team Tools/Performance Tools;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019//x64;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019/;C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/x64/;C:/Program Files (x86)/HTML Help Workshop;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/Tools/devinit;C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64;C:/Program Files (x86)/Windows Kits/10/bin/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise//MSBuild/Current/Bin;C:/Windows/Microsoft.NET/Framework64/v4.0.30319;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/Tools/;C:/Program Files/PowerShell/7;C:/Windows/system32;C:/Windows;C:/Windows/system32/Wbem;C:/Windows/system32/WindowsPowerShell/v1.0/;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/Llvm/x64/bin;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/VC/Linux/bin/ConnectionManagerExe;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja")
set(VCPKG_DETECTED_ENV_INCLUDE "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/include;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/include;C:/Program Files (x86)/Windows Kits/NETFXSDK/4.8/include/um;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/ucrt;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/shared;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/um;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/winrt;C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/cppwinrt")
set(VCPKG_DETECTED_ENV_C_INCLUDE_PATH "")
set(VCPKG_DETECTED_ENV_CPLUS_INCLUDE_PATH "")
set(VCPKG_DETECTED_ENV_LIB "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x64;C:/Program Files (x86)/Windows Kits/NETFXSDK/4.8/lib/um/x64;C:/Program Files (x86)/Windows Kits/10/lib/10.0.22000.0/ucrt/x64;C:/Program Files (x86)/Windows Kits/10/lib/10.0.22000.0/um/x64")
set(VCPKG_DETECTED_ENV_LIBPATH "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/ATLMFC/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/lib/x86/store/references;C:/Program Files (x86)/Windows Kits/10/UnionMetadata/10.0.22000.0;C:/Program Files (x86)/Windows Kits/10/References/10.0.22000.0;C:/Windows/Microsoft.NET/Framework64/v4.0.30319")
set(VCPKG_DETECTED_ENV_LIBRARY_PATH "")
set(VCPKG_DETECTED_ENV_LD_LIBRARY_PATH "")
set(VCPKG_COMBINED_CXX_FLAGS_RELEASE " -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -MD -O2 -Oi -Gy -DNDEBUG -Z7 ")
set(VCPKG_COMBINED_C_FLAGS_RELEASE " -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -MP -MD -O2 -Oi -Gy -DNDEBUG -Z7 ")
set(VCPKG_COMBINED_SHARED_LINKER_FLAGS_RELEASE "-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF ")
set(VCPKG_COMBINED_EXE_LINKER_FLAGS_RELEASE "-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF ")
set(VCPKG_COMBINED_STATIC_LINKER_FLAGS_RELEASE "-machine:x64 -nologo")
set(VCPKG_COMBINED_RC_FLAGS_RELEASE "-c65001 -DWIN32 ")

View File

@@ -0,0 +1,2 @@
include("${CMAKE_CURRENT_LIST_DIR}/cmake-get-vars-x64-windows-rel.cmake.log")
include("${CMAKE_CURRENT_LIST_DIR}/cmake-get-vars-x64-windows-dbg.cmake.log")

View File

@@ -0,0 +1,26 @@
[1/2] cmd /c "cd ../../x64-windows-dbg && "C:/Program Files/CMake/bin/cmake.exe" "D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=D:/a/1/s/externals/vcpkg/packages/boost-chrono_x64-windows/debug" "-DPORT=boost-chrono" "-DFEATURES=core" "-DWITH_PYTHON2=OFF" "-DWITH_PYTHON3=OFF" "-DCURRENT_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed/x64-windows" "-DB2_EXE=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/b2.exe" "-DSOURCE_PATH=D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/src/ost-1.79.0-66a76de957.clean" "-DBOOST_BUILD_PATH=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_CMAKE_VARS_FILE=D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/cmake-get-vars-x64-windows.cmake.log" "-DCMAKE_MAKE_PROGRAM=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/a/1/s/externals/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF""
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_LIBDIR
FEATURES
_VCPKG_ROOT_DIR
-- Build files have been written to: D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg
[2/2] cmd /c "cd .. && "C:/Program Files/CMake/bin/cmake.exe" "D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=D:/a/1/s/externals/vcpkg/packages/boost-chrono_x64-windows" "-DPORT=boost-chrono" "-DFEATURES=core" "-DWITH_PYTHON2=OFF" "-DWITH_PYTHON3=OFF" "-DCURRENT_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed/x64-windows" "-DB2_EXE=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/b2.exe" "-DSOURCE_PATH=D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/src/ost-1.79.0-66a76de957.clean" "-DBOOST_BUILD_PATH=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_CMAKE_VARS_FILE=D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/cmake-get-vars-x64-windows.cmake.log" "-DCMAKE_MAKE_PROGRAM=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v142" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/a/1/s/externals/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/a/1/s/externals/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/a/1/s/build/vcpkg_installed" "-DVCPKG_MANIFEST_INSTALL=OFF""
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_LIBDIR
FEATURES
_VCPKG_ROOT_DIR
-- Build files have been written to: D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel

View File

View File

View File

@@ -0,0 +1,329 @@
[1/2] cmd.exe /C "cd /D D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean\build && D:\a\1\s\build\vcpkg_installed\x64-windows\tools\boost-build\b2.exe toolset=msvc --user-config=D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg/user-config.jam --stagedir=D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg/stage --build-dir=D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg runtime-link=shared link=shared address-model=64 architecture=x86 target-os=windows threadapi=win32 variant=debug --disable-icu --with-atomic --with-random --with-date_time --with-filesystem --with-system --with-thread --with-chrono -j2 -sBOOST_ROOT=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build -sBOOST_BUILD_PATH=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build --debug-configuration --debug-building --debug-generators --ignore-site-config --hash -q debug-symbols=on -d +2 threading=multi stage"
notice: found boost-build.jam at D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/boost-build.jam
notice: loading B2 from D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/src/kernel/bootstrap.jam
notice: Site configuration files will be ignored due to the
notice: --ignore-site-config command-line option.
notice: Loading explicitly specified user configuration file:
D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\user-config.jam
notice: Searching 'D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from 'D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg'.
notice: [msvc-cfg] msvc-14.0 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe'
notice: [msvc-cfg] msvc-14.2 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\arm\cl.exe'
notice: will use 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe' for msvc, condition <toolset>msvc-142
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>ia64/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_ia64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>ia64/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_ia64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>arm/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_arm'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>arm/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_arm64'
Building target '../build/stage'
Build request: object(property-set)@377 <address-model>64 <architecture>x86 <debug-symbols>on <link>shared <runtime-link>shared <target-os>windows <threadapi>win32 <threading>multi <toolset>msvc <variant>debug
Command line free features:
Target requirements: <archiveflags>-machine:x64 -nologo <define>BOOST_ALL_NO_LIB=1 <hardcode-dll-paths>false <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg/stage/lib <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>toolset <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>freebsd:<linkflags>-lrt <target-os>linux:<linkflags>-lrt -lpthread <toolset>clang:<cxxflags>-Wextra <toolset>clang:<cxxflags>-Wno-long-long <toolset>clang:<cxxflags>-Wno-variadic-macros <toolset>clang:<cxxflags>-pedantic <toolset>clang:<warnings>on <toolset>darwin-4:<cxxflags>-Wno-variadic-macros <toolset>darwin-5:<cxxflags>-Wno-variadic-macros <toolset>darwin:<cxxflags>-Wextra <toolset>darwin:<cxxflags>-Wno-long-long <toolset>darwin:<cxxflags>-pedantic <toolset>gcc-4.4.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.5.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.6.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.6.3,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.7.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.8.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4:<cxxflags>-Wno-variadic-macros <toolset>gcc-5:<cxxflags>-Wno-variadic-macros <toolset>gcc:<cxxflags>-Wextra <toolset>gcc:<cxxflags>-Wno-long-long <toolset>intel:<cxxflags>-wd1418 <toolset>intel:<cxxflags>-wd193,304,383,444 <toolset>intel:<cxxflags>-wd2415 <toolset>intel:<cxxflags>-wd593,981 <toolset>msvc,<runtime-link>shared:<threading>multi <toolset>msvc:<cxxflags>/wd4512 <toolset>pathscale:<cxxflags>-Wno-long-long <toolset>pathscale:<cxxflags>-pedantic <toolset>pgi:<linkflags>-lrt <toolset>sun:<define>__typeof__=__typeof__ <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean\build>.stage-translate-path <warnings>all
Common properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>false <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg/stage/lib <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>toolset <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean\build>.stage-translate-path <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
Building target '../build/boost_chrono'
Build request: object(property-set)@384 <address-model>64 <architecture>x86 <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <inlining>off <link>shared <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
Command line free features:
Target requirements: <archiveflags>-machine:x64 -nologo <define>BOOST_ALL_NO_LIB=1 <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <link>shared:<define>BOOST_ALL_DYN_LINK=1 <link>static:<define>BOOST_All_STATIC_LINK=1 <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>freebsd:<linkflags>-lrt <target-os>linux:<linkflags>-lrt -lpthread <toolset>clang:<cxxflags>-Wextra <toolset>clang:<cxxflags>-Wno-long-long <toolset>clang:<cxxflags>-Wno-variadic-macros <toolset>clang:<cxxflags>-pedantic <toolset>clang:<warnings>on <toolset>darwin-4:<cxxflags>-Wno-variadic-macros <toolset>darwin-5:<cxxflags>-Wno-variadic-macros <toolset>darwin:<cxxflags>-Wextra <toolset>darwin:<cxxflags>-Wno-long-long <toolset>darwin:<cxxflags>-pedantic <toolset>gcc-4.4.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.5.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.6.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.6.3,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.7.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.8.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4:<cxxflags>-Wno-variadic-macros <toolset>gcc-5:<cxxflags>-Wno-variadic-macros <toolset>gcc:<cxxflags>-Wextra <toolset>gcc:<cxxflags>-Wno-long-long <toolset>intel:<cxxflags>-wd1418 <toolset>intel:<cxxflags>-wd193,304,383,444 <toolset>intel:<cxxflags>-wd2415 <toolset>intel:<cxxflags>-wd593,981 <toolset>msvc,<runtime-link>shared:<threading>multi <toolset>msvc:<cxxflags>/wd4512 <toolset>pathscale:<cxxflags>-Wno-long-long <toolset>pathscale:<cxxflags>-pedantic <toolset>pgi:<linkflags>-lrt <toolset>sun:<define>__typeof__=__typeof__ <warnings>all
Common properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
Usage requirements for boost_chrono:
Build properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
*** construct LIB
from { chrono.cpp.CPP }
from { thread_clock.cpp.CPP }
from { process_cpu_clocks.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
find-viable-generators target-type= LIB property-set=
trying type LIB
there are generators for this type
trying generator builtin.lib-generator ( -> LIB )
is viable
trying generator builtin.prebuilt ( -> LIB )
*** 1 viable generators
*** construct SHARED_LIB
from { chrono.cpp.CPP }
from { thread_clock.cpp.CPP }
from { process_cpu_clocks.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
find-viable-generators target-type= SHARED_LIB property-set=
trying type SHARED_LIB
there are generators for this type
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB IMPORT_LIB )
is viable
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB )
*** 1 viable generators
** generator msvc.link.dll
composing: true
*** construct OBJ
from { chrono.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
find-viable-generators target-type= OBJ property-set=
trying type OBJ
there are generators for this type
trying generator rc.compile.resource ( RC -> OBJ )
is viable
trying generator msvc.compile.c++ ( CPP -> OBJ )
is viable
trying generator msvc.compile.c ( C -> OBJ )
is viable
trying generator msvc.compile.rc ( RC -> OBJ )
is viable
trying generator msvc.compile.asm ( ASM -> OBJ )
is viable
trying generator msvc.compile.c.pch ( H -> C_PCH OBJ )
is viable
trying generator msvc.compile.c++.pch ( H -> CPP_PCH OBJ )
is viable
*** 6 viable generators
** generator msvc.compile.c++
composing:
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } }
generator msvc.compile.c++ spawned
{ msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ]
** generator 'msvc.compile.c' pruned
** generator 'msvc.compile.rc' pruned
** generator 'msvc.compile.asm' pruned
** generator 'msvc.compile.c.pch' pruned
** generator 'msvc.compile.c++.pch' pruned
*** construct SEARCHED_LIB
from { chrono.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
find-viable-generators target-type= SEARCHED_LIB property-set=
trying type SEARCHED_LIB
there are generators for this type
trying generator searched-lib-generator ( -> SEARCHED_LIB )
is viable
*** 1 viable generators
returned
generator searched-lib-generator spawned
*** construct STATIC_LIB
from { chrono.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
find-viable-generators target-type= STATIC_LIB property-set=
trying type STATIC_LIB
there are generators for this type
trying generator msvc.archive ( OBJ -> STATIC_LIB )
is viable
*** 1 viable generators
** generator msvc.archive
composing: true
returned
generator msvc.archive spawned
*** construct IMPORT_LIB
from { chrono.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
find-viable-generators target-type= IMPORT_LIB property-set=
trying type IMPORT_LIB
there are generators for this type
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB IMPORT_LIB )
is viable
generator msvc.link.dll is active, discaring
*** 0 viable generators
*** construct OBJ
from { thread_clock.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
*** 6 viable generators
** generator msvc.compile.c++
composing:
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } }
generator msvc.compile.c++ spawned
{ msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ]
** generator 'msvc.compile.c' pruned
** generator 'msvc.compile.rc' pruned
** generator 'msvc.compile.asm' pruned
** generator 'msvc.compile.c.pch' pruned
** generator 'msvc.compile.c++.pch' pruned
*** construct SEARCHED_LIB
from { thread_clock.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
*** 1 viable generators
returned
generator searched-lib-generator spawned
*** construct STATIC_LIB
from { thread_clock.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
*** 1 viable generators
** generator msvc.archive
composing: true
returned
generator msvc.archive spawned
*** construct IMPORT_LIB
from { thread_clock.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
generator msvc.link.dll is active, discaring
*** 0 viable generators
*** construct OBJ
from { process_cpu_clocks.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
*** 6 viable generators
** generator msvc.compile.c++
composing:
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } }
generator msvc.compile.c++ spawned
{ msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ]
** generator 'msvc.compile.c' pruned
** generator 'msvc.compile.rc' pruned
** generator 'msvc.compile.asm' pruned
** generator 'msvc.compile.c.pch' pruned
** generator 'msvc.compile.c++.pch' pruned
*** construct SEARCHED_LIB
from { process_cpu_clocks.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
*** 1 viable generators
returned
generator searched-lib-generator spawned
*** construct STATIC_LIB
from { process_cpu_clocks.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
*** 1 viable generators
** generator msvc.archive
composing: true
returned
generator msvc.archive spawned
*** construct IMPORT_LIB
from { process_cpu_clocks.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
generator msvc.link.dll is active, discaring
*** 0 viable generators
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>find-shared-library <relevant>find-static-library <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>response-file <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>toolset <relevant>toolset-msvc:version <relevant>user-interface <relevant>windows-api ] { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a ] { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } }
generator msvc.link.dll spawned
{ msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a ]
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a ] { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } }
generator builtin.lib-generator spawned
{ msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a ]
Usage requirements from boost_chrono: <define>BOOST_CHRONO_DYN_LINK=1 <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>define:<relevant>threading <relevant>define:<relevant>toolset <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>target-os <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a
Usage requirements for stage: <define>BOOST_CHRONO_DYN_LINK=1 <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>define:<relevant>threading <relevant>define:<relevant>toolset <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>target-os <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a
Build properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_CHRONO_DYN_LINK=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>false <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg/stage/lib <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>define:<relevant>threading <relevant>define:<relevant>toolset <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>target-os <relevant>threading <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>warnings:<relevant>toolset <relevant>windows-api <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean\build>.stage-translate-path <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a
*** construct INSTALLED_SHARED_LIB
from { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>off <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg/stage/lib <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>warnings:<relevant>toolset <relevant>windows-api <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
find-viable-generators target-type= INSTALLED_SHARED_LIB property-set= msvc-142/debug/address-model-64/architecture-x86/threading-multi
trying type INSTALLED_SHARED_LIB
there are generators for this type
trying generator install-shared-lib ( SHARED_LIB -> INSTALLED_SHARED_LIB )
is viable
*** 1 viable generators
returned { common%common.copy-boost_chrono-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } }
generator install-shared-lib spawned
{ common%common.copy-boost_chrono-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.link.dll-boost_chrono-vc142-mt-gd-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } }
with usage requirements: [ ]
Usage requirements from stage: <define>BOOST_CHRONO_DYN_LINK=1 <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>define:<relevant>threading <relevant>define:<relevant>toolset <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>target-os <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-dbg/boost/build/390fd8092bb4d388fcb8550939707c7a
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\stage
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\stage\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\stage"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\stage\lib
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\stage\lib\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\stage\lib"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a"
msvc.read-setup <pD:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18>msvc-setup.read
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone\msvc
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone\msvc\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone\msvc"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18"
file C:\Users\VssAdministrator\AppData\Local\Temp\jam1964b017.000
msvc.write-setup-script D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat
type "C:\Users\VssAdministrator\AppData\Local\Temp\jam1964b017.000" > "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat"
compile-c-c++ D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\thread_clock.obj
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
cl "..\src\thread_clock.cpp" -c -Fo"D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\thread_clock.obj" -TP /wd4512 /wd4675 /EHs /GR /Zc:throwingNew -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1 /Z7 /Od /Ob0 /W4 /MDd /Zc:forScope /Zc:wchar_t /Zc:inline /favor:blend -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 "-I..\include" "-ID:\a\1\s\build\vcpkg_installed\x64-windows\include"
cl : Command line warning D9025 : overriding '/W3' with '/W4'
thread_clock.cpp
compile-c-c++ D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\chrono.obj
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
cl "..\src\chrono.cpp" -c -Fo"D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\chrono.obj" -TP /wd4512 /wd4675 /EHs /GR /Zc:throwingNew -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1 /Z7 /Od /Ob0 /W4 /MDd /Zc:forScope /Zc:wchar_t /Zc:inline /favor:blend -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 "-I..\include" "-ID:\a\1\s\build\vcpkg_installed\x64-windows\include"
cl : Command line warning D9025 : overriding '/W3' with '/W4'
chrono.cpp
compile-c-c++ D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\process_cpu_clocks.obj
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
cl "..\src\process_cpu_clocks.cpp" -c -Fo"D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\process_cpu_clocks.obj" -TP /wd4512 /wd4675 /EHs /GR /Zc:throwingNew -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1 /Z7 /Od /Ob0 /W4 /MDd /Zc:forScope /Zc:wchar_t /Zc:inline /favor:blend -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 "-I..\include" "-ID:\a\1\s\build\vcpkg_installed\x64-windows\include"
cl : Command line warning D9025 : overriding '/W3' with '/W4'
process_cpu_clocks.cpp
msvc.link.dll D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_chrono-vc142-mt-gd-x64-1_79.dll
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
link /NOLOGO /INCREMENTAL:NO "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\chrono.obj" "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\thread_clock.obj" "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\process_cpu_clocks.obj" /DEBUG -machine:x64 -nologo -debug -INCREMENTAL /MACHINE:X64 /MANIFEST:EMBED /subsystem:console /out:"D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_chrono-vc142-mt-gd-x64-1_79.dll" /DLL /IMPLIB:"D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_chrono-vc142-mt-gd-x64-1_79.lib"
Creating library D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_chrono-vc142-mt-gd-x64-1_79.lib and object D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_chrono-vc142-mt-gd-x64-1_79.exp
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\stage\lib\boost_chrono-vc142-mt-gd-x64-1_79.dll
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_chrono-vc142-mt-gd-x64-1_79.dll" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\stage\lib\boost_chrono-vc142-mt-gd-x64-1_79.dll"
D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_chrono-vc142-mt-gd-x64-1_79.dll
1 file(s) copied.
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\stage\lib\boost_chrono-vc142-mt-gd-x64-1_79.lib
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_chrono-vc142-mt-gd-x64-1_79.lib" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\stage\lib\boost_chrono-vc142-mt-gd-x64-1_79.lib"
D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_chrono-vc142-mt-gd-x64-1_79.lib
1 file(s) copied.
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\stage\lib\boost_chrono-vc142-mt-gd-x64-1_79.pdb
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_chrono-vc142-mt-gd-x64-1_79.pdb" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\stage\lib\boost_chrono-vc142-mt-gd-x64-1_79.pdb"
D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg\boost\build\390fd8092bb4d388fcb8550939707c7a\boost_chrono-vc142-mt-gd-x64-1_79.pdb
1 file(s) copied.
[1/2] cmd.exe /C "cd /D D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-dbg && "C:\Program Files\CMake\bin\cmake.exe" -P cmake_install.cmake"
-- Install configuration: "Debug"
-- Installing: D:/a/1/s/externals/vcpkg/packages/boost-chrono_x64-windows/debug/lib/boost_chrono-vc142-mt-gd-x64-1_79.lib
-- Installing: D:/a/1/s/externals/vcpkg/packages/boost-chrono_x64-windows/debug/bin/boost_chrono-vc142-mt-gd-x64-1_79.dll

View File

@@ -0,0 +1,329 @@
[1/2] cmd.exe /C "cd /D D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean\build && D:\a\1\s\build\vcpkg_installed\x64-windows\tools\boost-build\b2.exe toolset=msvc --user-config=D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel/user-config.jam --stagedir=D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel/stage --build-dir=D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel runtime-link=shared link=shared address-model=64 architecture=x86 target-os=windows threadapi=win32 variant=release --disable-icu --with-atomic --with-random --with-date_time --with-filesystem --with-system --with-thread --with-chrono -j2 -sBOOST_ROOT=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build -sBOOST_BUILD_PATH=D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build --debug-configuration --debug-building --debug-generators --ignore-site-config --hash -q debug-symbols=on -d +2 threading=multi stage"
notice: found boost-build.jam at D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/boost-build.jam
notice: loading B2 from D:/a/1/s/build/vcpkg_installed/x64-windows/tools/boost-build/src/kernel/bootstrap.jam
notice: Site configuration files will be ignored due to the
notice: --ignore-site-config command-line option.
notice: Loading explicitly specified user configuration file:
D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\user-config.jam
notice: Searching 'D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from 'D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel'.
notice: [msvc-cfg] msvc-14.0 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe'
notice: [msvc-cfg] msvc-14.2 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\arm\cl.exe'
notice: will use 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe' for msvc, condition <toolset>msvc-142
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>x86/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>ia64/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_ia64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>ia64/<address-model>', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_ia64'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>arm/<address-model>32', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_arm'
notice: [msvc-cfg] condition: '<toolset>msvc-142/<architecture>arm/<address-model>64', setup: 'D:/a/1/s/build/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_arm64'
Building target '../build/stage'
Build request: object(property-set)@377 <address-model>64 <architecture>x86 <debug-symbols>on <link>shared <runtime-link>shared <target-os>windows <threadapi>win32 <threading>multi <toolset>msvc <variant>release
Command line free features:
Target requirements: <archiveflags>-machine:x64 -nologo <define>BOOST_ALL_NO_LIB=1 <hardcode-dll-paths>false <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel/stage/lib <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>toolset <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>freebsd:<linkflags>-lrt <target-os>linux:<linkflags>-lrt -lpthread <toolset>clang:<cxxflags>-Wextra <toolset>clang:<cxxflags>-Wno-long-long <toolset>clang:<cxxflags>-Wno-variadic-macros <toolset>clang:<cxxflags>-pedantic <toolset>clang:<warnings>on <toolset>darwin-4:<cxxflags>-Wno-variadic-macros <toolset>darwin-5:<cxxflags>-Wno-variadic-macros <toolset>darwin:<cxxflags>-Wextra <toolset>darwin:<cxxflags>-Wno-long-long <toolset>darwin:<cxxflags>-pedantic <toolset>gcc-4.4.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.5.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.6.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.6.3,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.7.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.8.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4:<cxxflags>-Wno-variadic-macros <toolset>gcc-5:<cxxflags>-Wno-variadic-macros <toolset>gcc:<cxxflags>-Wextra <toolset>gcc:<cxxflags>-Wno-long-long <toolset>intel:<cxxflags>-wd1418 <toolset>intel:<cxxflags>-wd193,304,383,444 <toolset>intel:<cxxflags>-wd2415 <toolset>intel:<cxxflags>-wd593,981 <toolset>msvc,<runtime-link>shared:<threading>multi <toolset>msvc:<cxxflags>/wd4512 <toolset>pathscale:<cxxflags>-Wno-long-long <toolset>pathscale:<cxxflags>-pedantic <toolset>pgi:<linkflags>-lrt <toolset>sun:<define>__typeof__=__typeof__ <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean\build>.stage-translate-path <warnings>all
Common properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>false <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel/stage/lib <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>toolset <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean\build>.stage-translate-path <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
Building target '../build/boost_chrono'
Build request: object(property-set)@384 <address-model>64 <architecture>x86 <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <inlining>full <link>shared <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
Command line free features:
Target requirements: <archiveflags>-machine:x64 -nologo <define>BOOST_ALL_NO_LIB=1 <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <link>shared:<define>BOOST_ALL_DYN_LINK=1 <link>static:<define>BOOST_All_STATIC_LINK=1 <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>freebsd:<linkflags>-lrt <target-os>linux:<linkflags>-lrt -lpthread <toolset>clang:<cxxflags>-Wextra <toolset>clang:<cxxflags>-Wno-long-long <toolset>clang:<cxxflags>-Wno-variadic-macros <toolset>clang:<cxxflags>-pedantic <toolset>clang:<warnings>on <toolset>darwin-4:<cxxflags>-Wno-variadic-macros <toolset>darwin-5:<cxxflags>-Wno-variadic-macros <toolset>darwin:<cxxflags>-Wextra <toolset>darwin:<cxxflags>-Wno-long-long <toolset>darwin:<cxxflags>-pedantic <toolset>gcc-4.4.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.5.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.6.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.6.3,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.7.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4.8.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option <toolset>gcc-4:<cxxflags>-Wno-variadic-macros <toolset>gcc-5:<cxxflags>-Wno-variadic-macros <toolset>gcc:<cxxflags>-Wextra <toolset>gcc:<cxxflags>-Wno-long-long <toolset>intel:<cxxflags>-wd1418 <toolset>intel:<cxxflags>-wd193,304,383,444 <toolset>intel:<cxxflags>-wd2415 <toolset>intel:<cxxflags>-wd593,981 <toolset>msvc,<runtime-link>shared:<threading>multi <toolset>msvc:<cxxflags>/wd4512 <toolset>pathscale:<cxxflags>-Wno-long-long <toolset>pathscale:<cxxflags>-pedantic <toolset>pgi:<linkflags>-lrt <toolset>sun:<define>__typeof__=__typeof__ <warnings>all
Common properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
Usage requirements for boost_chrono:
Build properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
*** construct LIB
from { chrono.cpp.CPP }
from { thread_clock.cpp.CPP }
from { process_cpu_clocks.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
find-viable-generators target-type= LIB property-set=
trying type LIB
there are generators for this type
trying generator builtin.lib-generator ( -> LIB )
is viable
trying generator builtin.prebuilt ( -> LIB )
*** 1 viable generators
*** construct SHARED_LIB
from { chrono.cpp.CPP }
from { thread_clock.cpp.CPP }
from { process_cpu_clocks.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
find-viable-generators target-type= SHARED_LIB property-set=
trying type SHARED_LIB
there are generators for this type
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB IMPORT_LIB )
is viable
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB )
*** 1 viable generators
** generator msvc.link.dll
composing: true
*** construct OBJ
from { chrono.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
find-viable-generators target-type= OBJ property-set=
trying type OBJ
there are generators for this type
trying generator rc.compile.resource ( RC -> OBJ )
is viable
trying generator msvc.compile.c++ ( CPP -> OBJ )
is viable
trying generator msvc.compile.c ( C -> OBJ )
is viable
trying generator msvc.compile.rc ( RC -> OBJ )
is viable
trying generator msvc.compile.asm ( ASM -> OBJ )
is viable
trying generator msvc.compile.c.pch ( H -> C_PCH OBJ )
is viable
trying generator msvc.compile.c++.pch ( H -> CPP_PCH OBJ )
is viable
*** 6 viable generators
** generator msvc.compile.c++
composing:
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } }
generator msvc.compile.c++ spawned
{ msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ]
** generator 'msvc.compile.c' pruned
** generator 'msvc.compile.rc' pruned
** generator 'msvc.compile.asm' pruned
** generator 'msvc.compile.c.pch' pruned
** generator 'msvc.compile.c++.pch' pruned
*** construct SEARCHED_LIB
from { chrono.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
find-viable-generators target-type= SEARCHED_LIB property-set=
trying type SEARCHED_LIB
there are generators for this type
trying generator searched-lib-generator ( -> SEARCHED_LIB )
is viable
*** 1 viable generators
returned
generator searched-lib-generator spawned
*** construct STATIC_LIB
from { chrono.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
find-viable-generators target-type= STATIC_LIB property-set=
trying type STATIC_LIB
there are generators for this type
trying generator msvc.archive ( OBJ -> STATIC_LIB )
is viable
*** 1 viable generators
** generator msvc.archive
composing: true
returned
generator msvc.archive spawned
*** construct IMPORT_LIB
from { chrono.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
find-viable-generators target-type= IMPORT_LIB property-set=
trying type IMPORT_LIB
there are generators for this type
trying generator msvc.link.dll ( OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB -> SHARED_LIB IMPORT_LIB )
is viable
generator msvc.link.dll is active, discaring
*** 0 viable generators
*** construct OBJ
from { thread_clock.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
*** 6 viable generators
** generator msvc.compile.c++
composing:
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } }
generator msvc.compile.c++ spawned
{ msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ]
** generator 'msvc.compile.c' pruned
** generator 'msvc.compile.rc' pruned
** generator 'msvc.compile.asm' pruned
** generator 'msvc.compile.c.pch' pruned
** generator 'msvc.compile.c++.pch' pruned
*** construct SEARCHED_LIB
from { thread_clock.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
*** 1 viable generators
returned
generator searched-lib-generator spawned
*** construct STATIC_LIB
from { thread_clock.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
*** 1 viable generators
** generator msvc.archive
composing: true
returned
generator msvc.archive spawned
*** construct IMPORT_LIB
from { thread_clock.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
generator msvc.link.dll is active, discaring
*** 0 viable generators
*** construct OBJ
from { process_cpu_clocks.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
*** 6 viable generators
** generator msvc.compile.c++
composing:
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ] { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } }
generator msvc.compile.c++ spawned
{ msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>define <relevant>exception-handling <relevant>extern-c-nothrow <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>lto <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api ]
** generator 'msvc.compile.c' pruned
** generator 'msvc.compile.rc' pruned
** generator 'msvc.compile.asm' pruned
** generator 'msvc.compile.c.pch' pruned
** generator 'msvc.compile.c++.pch' pruned
*** construct SEARCHED_LIB
from { process_cpu_clocks.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
*** 1 viable generators
returned
generator searched-lib-generator spawned
*** construct STATIC_LIB
from { process_cpu_clocks.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
*** 1 viable generators
** generator msvc.archive
composing: true
returned
generator msvc.archive spawned
*** construct IMPORT_LIB
from { process_cpu_clocks.cpp.CPP }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>warnings:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
generator msvc.link.dll is active, discaring
*** 0 viable generators
SUCCESS: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>find-shared-library <relevant>find-static-library <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>response-file <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>toolset <relevant>toolset-msvc:version <relevant>user-interface <relevant>windows-api ] { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } }
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218 ] { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } }
generator msvc.link.dll spawned
{ msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218 ]
returned [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218 ] { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } }
generator builtin.lib-generator spawned
{ msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.lib.IMPORT_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.pdb.PDB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } }
with usage requirements: [ <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218 ]
Usage requirements from boost_chrono: <define>BOOST_CHRONO_DYN_LINK=1 <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>define:<relevant>threading <relevant>define:<relevant>toolset <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>target-os <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218
Usage requirements for stage: <define>BOOST_CHRONO_DYN_LINK=1 <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>define:<relevant>threading <relevant>define:<relevant>toolset <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>target-os <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218
Build properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_CHRONO_DYN_LINK=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>false <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel/stage/lib <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>define:<relevant>threading <relevant>define:<relevant>toolset <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>target-os <relevant>threading <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>warnings:<relevant>toolset <relevant>windows-api <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <translate-path>@Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean\build>%Jamfile<D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\src\ost-1.79.0-66a76de957.clean\build>.stage-translate-path <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218
*** construct INSTALLED_SHARED_LIB
from { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } }
properties: <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <cxxflags>/wd4512 <debug-store>object <debug-symbols>on <define>BOOST_ALL_DYN_LINK=1 <define>BOOST_ALL_NO_LIB=1 <define>NDEBUG <embed-manifest-via>linker <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>windows <include>../include&&/D:/a/1/s/build/vcpkg_installed/x64-windows/include <inlining>full <install-dependencies>off <link>shared <linkflags>-machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF <location>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel/stage/lib <main-target-type>LIB <midl-robust>yes <midl-stubless-proxy>yes <optimization>speed <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cflags <relevant>cxxflags <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>cxxstd <relevant>debug-store <relevant>debug-symbols <relevant>def-file <relevant>define <relevant>define:<relevant>link <relevant>define:<relevant>toolset <relevant>embed-manifest <relevant>embed-manifest-file <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>find-shared-library <relevant>find-static-library <relevant>force-include <relevant>include <relevant>inlining <relevant>instruction-set <relevant>library-file <relevant>library-path <relevant>link <relevant>linkflags <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>lto <relevant>main-target-type <relevant>mc-input-encoding <relevant>mc-output-encoding <relevant>mc-set-customer-bit <relevant>optimization <relevant>pch <relevant>pch-file <relevant>pch-header <relevant>pch-source <relevant>response-file <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>suppress-import-lib <relevant>threading <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>toolset <relevant>toolset-msvc:version <relevant>undef <relevant>user-interface <relevant>warnings <relevant>warnings-as-errors <relevant>warnings:<relevant>toolset <relevant>windows-api <response-file>auto <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-msvc:version>142 <toolset>msvc <user-interface>console <variant>release <vectorize>off <warnings-as-errors>off <warnings>all <windows-api>desktop
find-viable-generators target-type= INSTALLED_SHARED_LIB property-set= msvc-142/release/address-model-64/architecture-x86/debug-symbols-on/threading-multi
trying type INSTALLED_SHARED_LIB
there are generators for this type
trying generator install-shared-lib ( SHARED_LIB -> INSTALLED_SHARED_LIB )
is viable
*** 1 viable generators
returned { common%common.copy-boost_chrono-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } }
generator install-shared-lib spawned
{ common%common.copy-boost_chrono-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.link.dll-boost_chrono-vc142-mt-x64-1_79.dll.SHARED_LIB { msvc%msvc.compile.c++-chrono.obj.OBJ { chrono.cpp.CPP } } { msvc%msvc.compile.c++-thread_clock.obj.OBJ { thread_clock.cpp.CPP } } { msvc%msvc.compile.c++-process_cpu_clocks.obj.OBJ { process_cpu_clocks.cpp.CPP } } } }
with usage requirements: [ ]
Usage requirements from stage: <define>BOOST_CHRONO_DYN_LINK=1 <relevant>address-model <relevant>address-sanitizer <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>define:<relevant>link <relevant>define:<relevant>threading <relevant>define:<relevant>toolset <relevant>embed-manifest <relevant>embed-manifest-via <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>linkflags:<relevant>target-os <relevant>linkflags:<relevant>toolset <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>target-os <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api <xdll-path>/D:/a/1/s/externals/vcpkg/buildtrees/boost-chrono/x64-windows-rel/boost/build/aa84e6e880a9d383ddf248bc50c22218
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\stage
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\stage\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\stage"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\stage\lib
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\stage\lib\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\stage\lib"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218"
msvc.read-setup <pD:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18>msvc-setup.read
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone\msvc
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone\msvc\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone\msvc"
common.mkdir D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18
if not exist "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\\" mkdir "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18"
file C:\Users\VssAdministrator\AppData\Local\Temp\jam8b01a.000
msvc.write-setup-script D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat
type "C:\Users\VssAdministrator\AppData\Local\Temp\jam8b01a.000" > "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat"
compile-c-c++ D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\thread_clock.obj
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
cl "..\src\thread_clock.cpp" -c -Fo"D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\thread_clock.obj" -TP /wd4512 /wd4675 /EHs /GR /Zc:throwingNew -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -MD -O2 -Oi -Gy -DNDEBUG -Z7 /O2 /Z7 /Ob2 /W4 /MD /Zc:forScope /Zc:wchar_t /Zc:inline /Gw /favor:blend -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DNDEBUG "-I..\include" "-ID:\a\1\s\build\vcpkg_installed\x64-windows\include"
cl : Command line warning D9025 : overriding '/W3' with '/W4'
thread_clock.cpp
compile-c-c++ D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\chrono.obj
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
cl "..\src\chrono.cpp" -c -Fo"D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\chrono.obj" -TP /wd4512 /wd4675 /EHs /GR /Zc:throwingNew -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -MD -O2 -Oi -Gy -DNDEBUG -Z7 /O2 /Z7 /Ob2 /W4 /MD /Zc:forScope /Zc:wchar_t /Zc:inline /Gw /favor:blend -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DNDEBUG "-I..\include" "-ID:\a\1\s\build\vcpkg_installed\x64-windows\include"
cl : Command line warning D9025 : overriding '/W3' with '/W4'
chrono.cpp
compile-c-c++ D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\process_cpu_clocks.obj
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
cl "..\src\process_cpu_clocks.cpp" -c -Fo"D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\process_cpu_clocks.obj" -TP /wd4512 /wd4675 /EHs /GR /Zc:throwingNew -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -GR -EHsc -MP -MD -O2 -Oi -Gy -DNDEBUG -Z7 /O2 /Z7 /Ob2 /W4 /MD /Zc:forScope /Zc:wchar_t /Zc:inline /Gw /favor:blend -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DNDEBUG "-I..\include" "-ID:\a\1\s\build\vcpkg_installed\x64-windows\include"
cl : Command line warning D9025 : overriding '/W3' with '/W4'
process_cpu_clocks.cpp
msvc.link.dll D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_chrono-vc142-mt-x64-1_79.dll
call "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\standalone\msvc\19858a0c092d6daed3b7579665d68f18\msvc-setup.bat" amd64 >nul
link /NOLOGO /INCREMENTAL:NO "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\chrono.obj" "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\thread_clock.obj" "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\process_cpu_clocks.obj" /DEBUG -machine:x64 -nologo -DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF /MACHINE:X64 /MANIFEST:EMBED /OPT:REF,ICF /subsystem:console /out:"D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_chrono-vc142-mt-x64-1_79.dll" /DLL /IMPLIB:"D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_chrono-vc142-mt-x64-1_79.lib"
Creating library D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_chrono-vc142-mt-x64-1_79.lib and object D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_chrono-vc142-mt-x64-1_79.exp
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\stage\lib\boost_chrono-vc142-mt-x64-1_79.dll
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_chrono-vc142-mt-x64-1_79.dll" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\stage\lib\boost_chrono-vc142-mt-x64-1_79.dll"
D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_chrono-vc142-mt-x64-1_79.dll
1 file(s) copied.
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\stage\lib\boost_chrono-vc142-mt-x64-1_79.lib
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_chrono-vc142-mt-x64-1_79.lib" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\stage\lib\boost_chrono-vc142-mt-x64-1_79.lib"
D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_chrono-vc142-mt-x64-1_79.lib
1 file(s) copied.
common.copy D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\stage\lib\boost_chrono-vc142-mt-x64-1_79.pdb
copy /b "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_chrono-vc142-mt-x64-1_79.pdb" + this-file-does-not-exist-A698EE7806899E69 "D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\stage\lib\boost_chrono-vc142-mt-x64-1_79.pdb"
D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel\boost\build\aa84e6e880a9d383ddf248bc50c22218\boost_chrono-vc142-mt-x64-1_79.pdb
1 file(s) copied.
[1/2] cmd.exe /C "cd /D D:\a\1\s\externals\vcpkg\buildtrees\boost-chrono\x64-windows-rel && "C:\Program Files\CMake\bin\cmake.exe" -P cmake_install.cmake"
-- Install configuration: "Release"
-- Installing: D:/a/1/s/externals/vcpkg/packages/boost-chrono_x64-windows/lib/boost_chrono-vc142-mt-x64-1_79.lib
-- Installing: D:/a/1/s/externals/vcpkg/packages/boost-chrono_x64-windows/bin/boost_chrono-vc142-mt-x64-1_79.dll

View File

@@ -0,0 +1,96 @@
* text=auto !eol svneol=native#text/plain
*.gitattributes text svneol=native#text/plain
# Scriptish formats
*.bat text svneol=native#text/plain
*.bsh text svneol=native#text/x-beanshell
*.cgi text svneol=native#text/plain
*.cmd text svneol=native#text/plain
*.js text svneol=native#text/javascript
*.php text svneol=native#text/x-php
*.pl text svneol=native#text/x-perl
*.pm text svneol=native#text/x-perl
*.py text svneol=native#text/x-python
*.sh eol=lf svneol=LF#text/x-sh
configure eol=lf svneol=LF#text/x-sh
# Image formats
*.bmp binary svneol=unset#image/bmp
*.gif binary svneol=unset#image/gif
*.ico binary svneol=unset#image/ico
*.jpeg binary svneol=unset#image/jpeg
*.jpg binary svneol=unset#image/jpeg
*.png binary svneol=unset#image/png
*.tif binary svneol=unset#image/tiff
*.tiff binary svneol=unset#image/tiff
*.svg text svneol=native#image/svg%2Bxml
# Data formats
*.pdf binary svneol=unset#application/pdf
*.avi binary svneol=unset#video/avi
*.doc binary svneol=unset#application/msword
*.dsp text svneol=crlf#text/plain
*.dsw text svneol=crlf#text/plain
*.eps binary svneol=unset#application/postscript
*.gz binary svneol=unset#application/gzip
*.mov binary svneol=unset#video/quicktime
*.mp3 binary svneol=unset#audio/mpeg
*.ppt binary svneol=unset#application/vnd.ms-powerpoint
*.ps binary svneol=unset#application/postscript
*.psd binary svneol=unset#application/photoshop
*.rdf binary svneol=unset#text/rdf
*.rss text svneol=unset#text/xml
*.rtf binary svneol=unset#text/rtf
*.sln text svneol=native#text/plain
*.swf binary svneol=unset#application/x-shockwave-flash
*.tgz binary svneol=unset#application/gzip
*.vcproj text svneol=native#text/xml
*.vcxproj text svneol=native#text/xml
*.vsprops text svneol=native#text/xml
*.wav binary svneol=unset#audio/wav
*.xls binary svneol=unset#application/vnd.ms-excel
*.zip binary svneol=unset#application/zip
# Text formats
.htaccess text svneol=native#text/plain
*.bbk text svneol=native#text/xml
*.cmake text svneol=native#text/plain
*.css text svneol=native#text/css
*.dtd text svneol=native#text/xml
*.htm text svneol=native#text/html
*.html text svneol=native#text/html
*.ini text svneol=native#text/plain
*.log text svneol=native#text/plain
*.mak text svneol=native#text/plain
*.qbk text svneol=native#text/plain
*.rst text svneol=native#text/plain
*.sql text svneol=native#text/x-sql
*.txt text svneol=native#text/plain
*.xhtml text svneol=native#text/xhtml%2Bxml
*.xml text svneol=native#text/xml
*.xsd text svneol=native#text/xml
*.xsl text svneol=native#text/xml
*.xslt text svneol=native#text/xml
*.xul text svneol=native#text/xul
*.yml text svneol=native#text/plain
boost-no-inspect text svneol=native#text/plain
CHANGES text svneol=native#text/plain
COPYING text svneol=native#text/plain
INSTALL text svneol=native#text/plain
Jamfile text svneol=native#text/plain
Jamroot text svneol=native#text/plain
Jamfile.v2 text svneol=native#text/plain
Jamrules text svneol=native#text/plain
Makefile* text svneol=native#text/plain
README text svneol=native#text/plain
TODO text svneol=native#text/plain
# Code formats
*.c text svneol=native#text/plain
*.cpp text svneol=native#text/plain
*.h text svneol=native#text/plain
*.hpp text svneol=native#text/plain
*.ipp text svneol=native#text/plain
*.tpp text svneol=native#text/plain
*.jam text svneol=native#text/plain
*.java text svneol=native#text/plain

View File

@@ -0,0 +1,199 @@
name: CI
on:
pull_request:
push:
branches:
- master
- develop
- feature/**
env:
UBSAN_OPTIONS: print_stacktrace=1
jobs:
posix:
strategy:
fail-fast: false
matrix:
include:
- toolset: gcc-4.8
cxxstd: "03,11"
os: ubuntu-18.04
install: g++-4.8
- toolset: gcc-5
cxxstd: "03,11,14,1z"
os: ubuntu-18.04
install: g++-5
- toolset: gcc-6
cxxstd: "03,11,14,1z"
os: ubuntu-18.04
install: g++-6
- toolset: gcc-7
cxxstd: "03,11,14,17"
os: ubuntu-18.04
- toolset: gcc-8
cxxstd: "03,11,14,17,2a"
os: ubuntu-18.04
install: g++-8
- toolset: gcc-9
cxxstd: "03,11,14,17,2a"
os: ubuntu-20.04
- toolset: gcc-10
cxxstd: "03,11,14,17,2a"
os: ubuntu-20.04
install: g++-10
- toolset: gcc-11
cxxstd: "03,11,14,17,2a"
os: ubuntu-20.04
install: g++-11
- toolset: clang
compiler: clang++-3.9
cxxstd: "03,11,14"
os: ubuntu-18.04
install: clang-3.9
- toolset: clang
compiler: clang++-4.0
cxxstd: "03,11,14"
os: ubuntu-18.04
install: clang-4.0
- toolset: clang
compiler: clang++-5.0
cxxstd: "03,11,14,1z"
os: ubuntu-18.04
install: clang-5.0
- toolset: clang
compiler: clang++-6.0
cxxstd: "03,11,14,17"
os: ubuntu-18.04
install: clang-6.0
- toolset: clang
compiler: clang++-7
cxxstd: "03,11,14,17"
os: ubuntu-18.04
install: clang-7
- toolset: clang
compiler: clang++-8
cxxstd: "03,11,14,17"
os: ubuntu-20.04
install: clang-8
- toolset: clang
compiler: clang++-9
cxxstd: "03,11,14,17"
os: ubuntu-20.04
install: clang-9
- toolset: clang
compiler: clang++-10
cxxstd: "03,11,14,17,2a"
os: ubuntu-20.04
- toolset: clang
compiler: clang++-11
cxxstd: "03,11,14,17,2a"
os: ubuntu-20.04
- toolset: clang
compiler: clang++-12
cxxstd: "03,11,14,17,2a"
os: ubuntu-20.04
- toolset: clang
cxxstd: "03,11,14,17,2a"
os: macos-10.15
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Install packages
if: matrix.install
run: sudo apt install ${{matrix.install}}
- name: Setup Boost
run: |
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
LIBRARY=${GITHUB_REPOSITORY#*/}
echo LIBRARY: $LIBRARY
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
echo GITHUB_REF: $GITHUB_REF
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
REF=${REF#refs/heads/}
echo REF: $REF
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
echo BOOST_BRANCH: $BOOST_BRANCH
cd ..
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
./bootstrap.sh
./b2 -d0 headers
- name: Create user-config.jam
if: matrix.compiler
run: |
echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam
- name: Run tests
run: |
cd ../boost-root
./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release
windows:
strategy:
fail-fast: false
matrix:
include:
- toolset: msvc-14.0
cxxstd: "14"
addrmd: 32,64
os: windows-2019
- toolset: msvc-14.2
cxxstd: "14,17,20,latest"
addrmd: 32,64
os: windows-2019
- toolset: msvc-14.3
cxxstd: "14,17,20,latest"
addrmd: 32,64
os: windows-2022
- toolset: clang-win
cxxstd: "14,17,latest"
addrmd: 32,64
os: windows-2022
- toolset: gcc
cxxstd: "03,11,14,17,2a"
addrmd: 64
os: windows-2019
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Setup Boost
shell: cmd
run: |
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
echo LIBRARY: %LIBRARY%
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
echo GITHUB_REF: %GITHUB_REF%
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
set BOOST_BRANCH=develop
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
echo BOOST_BRANCH: %BOOST_BRANCH%
cd ..
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
cmd /c bootstrap
b2 -d0 headers
- name: Run tests
shell: cmd
run: |
cd ../boost-root
b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker

View File

@@ -0,0 +1 @@
/.project

View File

@@ -0,0 +1,319 @@
# Copyright 2016, 2017 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
language: cpp
sudo: false
python: "2.7"
os:
- linux
- osx
branches:
only:
- master
- develop
- /feature\/.*/
env:
matrix:
- BOGUS_JOB=true
matrix:
exclude:
- env: BOGUS_JOB=true
include:
- os: linux
compiler: g++-4.7
env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=c++11
addons:
apt:
packages:
- g++-4.7
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-4.8
env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=c++11
addons:
apt:
packages:
- g++-4.8
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-4.9
env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=c++11
addons:
apt:
packages:
- g++-4.9
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-5
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++11
addons:
apt:
packages:
- g++-5
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-5
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14
addons:
apt:
packages:
- g++-5
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-5
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++1z
addons:
apt:
packages:
- g++-5
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-6
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11
addons:
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-6
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14
addons:
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-6
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z
addons:
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: trusty
compiler: g++-7
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=c++11
addons:
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: trusty
compiler: g++-7
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=c++14
addons:
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: trusty
compiler: g++-7
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=c++1z
addons:
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: clang++-3.5
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=c++11
addons:
apt:
packages:
- clang-3.5
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5
- os: linux
compiler: clang++-3.6
env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=c++11
addons:
apt:
packages:
- clang-3.6
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.6
- os: linux
compiler: clang++-3.7
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=c++11
addons:
apt:
packages:
- clang-3.7
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
- os: linux
compiler: clang++-3.8
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=c++11
addons:
apt:
packages:
- clang-3.8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
#- os: linux
# compiler: clang++-3.8
# env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=c++14
# addons:
# apt:
# packages:
# - clang-3.8
# sources:
# - ubuntu-toolchain-r-test
# - llvm-toolchain-precise-3.8
#- os: linux
# compiler: clang++-3.8
# env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=c++1z
# addons:
# apt:
# packages:
# - clang-3.8
# sources:
# - ubuntu-toolchain-r-test
# - llvm-toolchain-precise-3.8
- os: linux
compiler: clang++-3.9
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=c++11
addons:
apt:
packages:
- clang-3.9
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.9
#- os: linux
# compiler: clang++-3.9
# env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=c++14
# addons:
# apt:
# packages:
# - clang-3.9
# sources:
# - ubuntu-toolchain-r-test
# - llvm-toolchain-precise-3.9
#- os: linux
# compiler: clang++-3.9
# env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=c++1z
# addons:
# apt:
# packages:
# - clang-3.9
# sources:
# - ubuntu-toolchain-r-test
# - llvm-toolchain-precise-3.9
- os: linux
compiler: clang++-4.0
env: TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=c++11
addons:
apt:
packages:
- clang-4.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
- os: linux
compiler: clang++-4.0
env: TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=c++14
addons:
apt:
packages:
- clang-4.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
- os: linux
compiler: clang++-4.0
env: TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=c++1z
addons:
apt:
packages:
- clang-4.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
- os: osx
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++11
- os: osx
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14
- os: osx
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++1z
install:
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
- cd ..
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule update --init tools/build
- git submodule update --init libs/config
- git submodule update --init tools/boostdep
- mkdir -p libs/chrono
- cp -r $TRAVIS_BUILD_DIR/* libs/chrono
- python tools/boostdep/depinst/depinst.py chrono
- ./bootstrap.sh
- ./b2 headers
script:
- |-
echo "using $TOOLSET : : $COMPILER : <cxxflags>-std=$CXXSTD ;" > ~/user-config.jam
- ./b2 libs/chrono/test toolset=$TOOLSET
notifications:
email:
on_success: always

View File

@@ -0,0 +1,54 @@
# Copyright 2020, 2021 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required(VERSION 3.5...3.16)
project(boost_chrono VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
add_library(boost_chrono
src/chrono.cpp
src/process_cpu_clocks.cpp
src/thread_clock.cpp
)
add_library(Boost::chrono ALIAS boost_chrono)
target_include_directories(boost_chrono PUBLIC include)
target_link_libraries(boost_chrono
PUBLIC
Boost::assert
Boost::config
Boost::core
Boost::integer
Boost::move
Boost::mpl
Boost::predef
Boost::ratio
Boost::static_assert
Boost::system
Boost::throw_exception
Boost::type_traits
Boost::typeof
Boost::utility
Boost::winapi
)
target_compile_definitions(boost_chrono
PUBLIC BOOST_CHRONO_NO_LIB
# Source files already define BOOST_CHRONO_SOURCE
# PRIVATE BOOST_CHRONO_SOURCE
)
if(BUILD_SHARED_LIBS)
target_compile_definitions(boost_chrono PUBLIC BOOST_CHRONO_DYN_LINK)
else()
target_compile_definitions(boost_chrono PUBLIC BOOST_CHRONO_STATIC_LINK)
endif()
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()

View File

@@ -0,0 +1,180 @@
constant BOOST_VERSION : 1.79.0 ;
constant BOOST_VERSION_ABI_TAG : 1_79 ;
constant BOOST_JAMROOT_MODULE : $(__name__) ;
import boostcpp ;
import feature ;
boostcpp.set-version $(BOOST_VERSION) ;
project boost : requirements
<include>include&&"D:/a/1/s/build/vcpkg_installed/x64-windows/include"
<define>BOOST_ALL_NO_LIB=1
<tag>@$(__name__).tag
;
rule boost-install ( libraries * )
{
stagedir = [ option.get stagedir ] ;
install stage
: $(libraries)
: <location>$(stagedir)/lib ;
}
rule tag ( name : type ? : property-set )
{
return [ boostcpp.tag $(name) : $(type) : $(property-set) ] ;
}
rule python-tag ( name : type ? : property-set )
{
return [ boostcpp.python-tag $(name) : $(type) : $(property-set) ] ;
}
if "boost-chrono" != "boost-system"
{
use-project /boost/system : . ;
lib boost_system : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_system-vc140-mt.lib" <variant>release ;
lib boost_system : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_system-vc140-mt-gd.lib" <variant>debug ;
explicit boost_system ;
use-project /boost : . ;
alias system : boost_system ;
}
if "boost-chrono" != "boost-chrono"
{
use-project /boost/chrono : . ;
lib boost_chrono : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_chrono-vc140-mt.lib" <variant>release ;
lib boost_chrono : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_chrono-vc140-mt-gd.lib" <variant>debug ;
explicit boost_chrono ;
}
if "boost-chrono" != "boost-regex"
{
use-project /boost/regex : . ;
lib boost_regex : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_regex-vc140-mt.lib" <variant>release ;
lib boost_regex : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_regex-vc140-mt-gd.lib" <variant>debug ;
explicit boost_regex ;
}
if "boost-chrono" != "boost-date-time"
{
use-project /boost/date_time : . ;
lib boost_date_time : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_date_time-vc140-mt.lib" <variant>release -<library>/boost/date_time//boost_date_time ;
lib boost_date_time : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_date_time-vc140-mt-gd.lib" <variant>debug -<library>/boost/date_time//boost_date_time ;
explicit boost_date_time ;
}
if "boost-chrono" != "boost-thread"
{
use-project /boost/thread : . ;
lib boost_thread : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_thread-vc140-mt.lib" <variant>release : : <library>/boost/date_time//boost_date_time ;
lib boost_thread : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_thread-vc140-mt-gd.lib" <variant>debug : : <library>/boost/date_time//boost_date_time ;
explicit boost_thread ;
}
if "boost-chrono" != "boost-timer"
{
use-project /boost/timer : . ;
lib boost_timer : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_timer-vc140-mt.lib" <variant>release ;
lib boost_timer : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_timer-vc140-mt-gd.lib" <variant>debug ;
explicit boost_timer ;
}
if "boost-chrono" != "boost-filesystem"
{
use-project /boost/filesystem : . ;
lib boost_filesystem : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_filesystem-vc140-mt.lib" <variant>release : : <library>/boost/system//boost_system ;
lib boost_filesystem : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_filesystem-vc140-mt-gd.lib" <variant>debug : : <library>/boost/system//boost_system ;
explicit boost_filesystem ;
}
if "boost-chrono" != "boost-atomic"
{
use-project /boost/atomic : . ;
lib boost_atomic : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_atomic-vc140-mt.lib" <variant>release ;
lib boost_atomic : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_atomic-vc140-mt-gd.lib" <variant>debug ;
explicit boost_atomic ;
}
if "boost-chrono" != "boost-context"
{
feature.feature segmented-stacks : on : optional propagated composite ;
feature.compose <segmented-stacks>on : <define>BOOST_USE_SEGMENTED_STACKS ;
use-project /boost/context : . ;
lib boost_context : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_context-vc140-mt.lib" <variant>release ;
lib boost_context : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_context-vc140-mt-gd.lib" <variant>debug ;
explicit boost_context ;
}
if "boost-chrono" != "boost-test"
{
use-project /boost/test : . ;
lib boost_unit_test_framework : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_unit_test_framework-vc140-mt.lib" <variant>release ;
lib boost_unit_test_framework : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_unit_test_framework-vc140-mt-gd.lib" <variant>debug ;
explicit boost_unit_test_framework ;
}
if "boost-chrono" != "boost-serialization"
{
use-project /boost/serialization : . ;
lib boost_serialization : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_serialization-vc140-mt.lib" <variant>release ;
lib boost_serialization : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_serialization-vc140-mt-gd.lib" <variant>debug ;
explicit boost_serialization ;
}
if "boost-chrono" != "boost-mpi"
{
use-project /boost/mpi : . ;
lib boost_mpi : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_mpi-vc140-mt.lib" <variant>release : : <library>/boost/serialization//boost_serialization ;
lib boost_mpi : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_mpi-vc140-mt-gd.lib" <variant>debug : : <library>/boost/serialization//boost_serialization ;
explicit boost_mpi ;
}
if "boost-chrono" != "boost-container"
{
use-project /boost/container : . ;
lib boost_container : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_container-vc140-mt.lib" <variant>release ;
lib boost_container : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_container-vc140-mt-gd.lib" <variant>debug ;
explicit boost_container ;
}
if "boost-chrono" != "boost-python"
{
use-project /boost/python : . ;
lib boost_python : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/lib/boost_python-vc140-mt.lib" <variant>release ;
lib boost_python : : <file>"D:/a/1/s/build/vcpkg_installed/x64-windows/debug/lib/boost_python-vc140-mt-gd.lib" <variant>debug ;
explicit boost_python ;
}
rule requires ( foo * )
{
}
rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * )
{
name = boost_$(name) ;
lib $(name) : $(sources) : $(requirements) : $(default-build) : $(usage-requirements) ;
boost-install $(name) ;
}
use-project /boost/boost-chrono : build ;
build-project build ;

View File

@@ -0,0 +1,8 @@
Chrono
======
Useful time utilities. C++11.
### License
Distributed under the [Boost Software License, Version 1.0](http://boost.org/LICENSE_1_0.txt).

View File

@@ -0,0 +1,43 @@
# Copyright 2016, 2017 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
version: 1.0.{build}-{branch}
shallow_clone: true
branches:
only:
- master
- develop
- /feature\/.*/
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-12.0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-14.0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: msvc-14.1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
TOOLSET: msvc-14.2
install:
- set BOOST_BRANCH=develop
- if "%APPVEYOR_REPO_BRANCH%" == "master" set BOOST_BRANCH=master
- cd ..
- git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule update --init tools/build
- git submodule update --init libs/config
- git submodule update --init tools/boostdep
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\chrono\
- python tools/boostdep/depinst/depinst.py chrono
- cmd /c bootstrap
- b2 headers
build: off
test_script:
- b2 -j3 libs/chrono/test toolset=%TOOLSET% address-model=32,64 variant=debug,release

View File

@@ -0,0 +1,113 @@
# Boost Chrono Library Build Jamfile
# Copyright Beman Dawes 2002, 2006, 2008
# Copyright 2009-2012 Vicente J.Botet Escriba.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or www.boost.org/LICENSE_1_0.txt)
# See library home page at http://www.boost.org/libs/chrono
project boost/chrono
: source-location ../src
: requirements
<target-os>freebsd:<linkflags>"-lrt"
<target-os>linux:<linkflags>"-lrt -lpthread"
<toolset>pgi:<linkflags>"-lrt"
#<threading>single:<define>BOOST_CHRONO_THREAD_DISABLED
#<define>BOOST_ERROR_CODE_HEADER_ONLY
#<define>BOOST_COMMON_TYPE_USES_STATIC_ASSERT
#<define>BOOST_RATIO_USES_STATIC_ASSERT
#<define>BOOST_CHRONO_USES_STATIC_ASSERT
#<define>BOOST_COMMON_TYPE_USES_MPL_ASSERT
#<define>BOOST_RATIO_USES_MPL_ASSERT
#<define>BOOST_CHRONO_USES_MPL_ASSERT
#<define>BOOST_COMMON_TYPE_USES_ARRAY_ASSERT
#<define>BOOST_RATIO_USES_ARRAY_ASSERT
#<define>BOOST_CHRONO_USES_ARRAY_ASSERT
<toolset>sun:<define>__typeof__=__typeof__
#<toolset>gcc-3.4.4:<linkflags>--enable-auto-import
#<toolset>gcc-4.3.4:<linkflags>--enable-auto-import
#<toolset>gcc-mingw-4.4.0:<linkflags>--enable-auto-import
#<toolset>gcc-mingw-4.5.0:<linkflags>--enable-auto-import
<warnings>all
<toolset>gcc:<cxxflags>-Wextra
#<toolset>gcc:<cxxflags>-pedantic
<toolset>clang:<warnings>on
<toolset>gcc:<cxxflags>-Wno-long-long
#<toolset>gcc:<cxxflags>-Wno-variadic-macros
<toolset>gcc-4:<cxxflags>-Wno-variadic-macros
<toolset>gcc-5:<cxxflags>-Wno-variadic-macros
<toolset>darwin:<cxxflags>-Wextra
<toolset>darwin:<cxxflags>-pedantic
<toolset>darwin:<cxxflags>-Wno-long-long
#<toolset>darwin:<cxxflags>-Wno-variadic-macros
<toolset>darwin-4:<cxxflags>-Wno-variadic-macros
<toolset>darwin-5:<cxxflags>-Wno-variadic-macros
#<toolset>pathscale:<cxxflags>-Wextra
<toolset>pathscale:<cxxflags>-Wno-long-long
<toolset>pathscale:<cxxflags>-pedantic
<toolset>clang:<cxxflags>-Wextra
<toolset>clang:<cxxflags>-pedantic
<toolset>clang:<cxxflags>-Wno-long-long
<toolset>clang:<cxxflags>-Wno-variadic-macros
<toolset>gcc-4.4.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-4.5.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-4.6.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-4.6.3,<target-os>windows:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-4.7.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-4.8.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option
<toolset>msvc:<cxxflags>/wd4512
# Note: Some of the remarks from the Intel compiler are disabled
# remark #193: zero used for undefined preprocessing identifier "XXX"
# remark #304: access control not specified ("public" by default)
# remark #383: value copied to temporary, reference to temporary used
# remark #444: destructor for base class "XXX" (declared at line YYY") is not virtual
# remark #593: variable "XXX" was set but never used
# remark #981: operands are evaluated in unspecified order
# remark #1418: external function definition with no prior declaration
# remark #2415: variable "XXX" of static storage duration was declared but never referenced
<toolset>intel:<cxxflags>-wd193,304,383,444
<toolset>intel:<cxxflags>-wd593,981
<toolset>intel:<cxxflags>-wd1418
<toolset>intel:<cxxflags>-wd2415
: usage-requirements # pass these requirement to dependents (i.e. users)
<threading>single:<define>BOOST_CHRONO_THREAD_DISABLED
#<define>BOOST_ERROR_CODE_HEADER_ONLY
#<define>BOOST_COMMON_TYPE_USES_STATIC_ASSERT
#<define>BOOST_RATIO_USES_STATIC_ASSERT
#<define>BOOST_CHRONO_USES_STATIC_ASSERT
#<define>BOOST_COMMON_TYPE_USES_MPL_ASSERT
#<define>BOOST_RATIO_USES_MPL_ASSERT
#<define>BOOST_CHRONO_USES_MPL_ASSERT
#<define>BOOST_COMMON_TYPE_USES_ARRAY_ASSERT
#<define>BOOST_RATIO_USES_ARRAY_ASSERT
#<define>BOOST_CHRONO_USES_ARRAY_ASSERT
#<toolset>vacpp:<define>BOOST_COMMON_TYPE_DONT_USE_TYPEOF
<toolset>vacpp:<define>BOOST_TYPEOF_EMULATION
<toolset>sun:<define>__typeof__=__typeof__
<link>shared:<define>BOOST_CHRONO_DYN_LINK=1
<link>static:<define>BOOST_CHRONO_STATIC_LINK=1
<toolset>gcc-3.4.4:<linkflags>--enable-auto-import
<toolset>gcc-4.3.4:<linkflags>--enable-auto-import
<toolset>gcc-4.4.0,<target-os>windows:<linkflags>--enable-auto-import
<toolset>gcc-4.5.0,<target-os>windows:<linkflags>--enable-auto-import
;
SOURCES = chrono thread_clock process_cpu_clocks ;
lib boost_chrono
: $(SOURCES).cpp
:
<link>shared:<define>BOOST_ALL_DYN_LINK=1 # tell source we're building dll's
<link>static:<define>BOOST_All_STATIC_LINK=1 # tell source we're building static lib's
;
boost-install boost_chrono ;

View File

@@ -0,0 +1,86 @@
# Boost.Chrono library documentation Jamfile ---------------------------------
#
# Copyright Vicente J. Botet Escriba 2009. Use, modification and
# distribution is subject to the Boost Software License, Version
# 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
# See http://www.boost.org for updates, documentation, and revision history.
#import doxygen ;
using quickbook ;
#doxygen autodoc
# :
# [ glob ../../../boost/chrono/*.hpp ]
# [ glob ../../../boost/chrono/allocators/*.hpp ]
# :
# <doxygen:param>EXTRACT_ALL=NO
# <doxygen:param>HIDE_UNDOC_MEMBERS=YES
# <doxygen:param>EXTRACT_PRIVATE=NO
# <doxygen:param>EXPAND_ONLY_PREDEF=YES
# <doxygen:param>PREDEFINED=BOOST_INTERPROCESS_DOXYGEN_INVOKED
# <xsl:param>"boost.doxygen.reftitle=Boost.Chrono Reference"
# ;
xml chrono : chrono.qbk ;
boostbook standalone
:
chrono
:
# HTML options first:
# Use graphics not text for navigation:
<xsl:param>navig.graphics=1
# How far down we chunk nested sections, basically all of them:
<xsl:param>chunk.section.depth=2
# Don't put the first section on the same page as the TOC:
<xsl:param>chunk.first.sections=1
# How far down sections get TOC's
<xsl:param>toc.section.depth=4
# Max depth in each TOC:
<xsl:param>toc.max.depth=2
# How far down we go with TOC's
<xsl:param>generate.section.toc.level=10
# Path for links to Boost:
<xsl:param>boost.root=../../../..
# Path for libraries index:
<xsl:param>boost.libraries=../../../../libs/libraries.htm
# Use the main Boost stylesheet:
<xsl:param>html.stylesheet=../../../../doc/src/boostbook.css
# PDF Options:
# TOC Generation: this is needed for FOP-0.9 and later:
<format>pdf:<xsl:param>fop1.extensions=0
# Or enable this if you're using XEP:
<format>pdf:<xsl:param>xep.extensions=1
# TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9!
<format>pdf:<xsl:param>fop.extensions=0
# No indent on body text:
<xsl:param>body.start.indent=0pt
# Margin size:
<xsl:param>page.margin.inner=0.5in
# Margin size:
<xsl:param>page.margin.outer=0.5in
# Yes, we want graphics for admonishments:
<xsl:param>admon.graphics=1
# Set this one for PDF generation *only*:
# default pnd graphics are awful in PDF form,
# better use SVG's instead:
<format>pdf:<xsl:param>admon.graphics.extension=".svg"
<format>pdf:<xsl:param>admon.graphics.path=$(boost-images)
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/chrono/doc/html
;
install pdfinstall : standalone/<format>pdf : <location>. <install-type>PDF ;
explicit pdfinstall ;
###############################################################################
alias boostdoc
: chrono
:
:
: ;
explicit boostdoc ;
alias boostrelease ;
explicit boostrelease ;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,73 @@
// await_keystroke.cpp -----------------------------------------------------//
// Copyright Beman Dawes 2008
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#define _CRT_SECURE_NO_WARNINGS
#include <boost/chrono/chrono.hpp>
#include <iostream>
#include <iomanip>
using namespace boost::chrono;
template< class Clock >
class timer
{
typename Clock::time_point start;
public:
timer() : start( Clock::now() ) {}
typename Clock::duration elapsed() const
{
return Clock::now() - start;
}
double seconds() const
{
return elapsed().count() * ((double)Clock::period::num/Clock::period::den);
}
};
int main()
{
timer<system_clock> t1;
timer<steady_clock> t2;
timer<high_resolution_clock> t3;
std::cout << "Strike any key: ";
std::cin.get();
std::cout << std::fixed << std::setprecision(9);
std::cout << "system_clock-----------: "
<< t1.seconds() << " seconds\n";
std::cout << "steady_clock--------: "
<< t2.seconds() << " seconds\n";
std::cout << "high_resolution_clock--: "
<< t3.seconds() << " seconds\n";
system_clock::time_point d4 = system_clock::now();
system_clock::time_point d5 = system_clock::now();
std::cout << "\nsystem_clock latency-----------: " << (d5 - d4).count() << std::endl;
steady_clock::time_point d6 = steady_clock::now();
steady_clock::time_point d7 = steady_clock::now();
std::cout << "steady_clock latency--------: " << (d7 - d6).count() << std::endl;
high_resolution_clock::time_point d8 = high_resolution_clock::now();
high_resolution_clock::time_point d9 = high_resolution_clock::now();
std::cout << "high_resolution_clock latency--: " << (d9 - d8).count() << std::endl;
std::time_t now = system_clock::to_time_t(system_clock::now());
std::cout << "\nsystem_clock::now() reports UTC is "
<< std::asctime(std::gmtime(&now)) << "\n";
return 0;
}

View File

@@ -0,0 +1,32 @@
// chrono_unit_test.cpp ----------------------------------------------------//
// Copyright 2008 Beman Dawes
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#define _CRT_SECURE_NO_WARNINGS // disable VC++ foolishness
#include <boost/chrono/chrono.hpp>
#include <iostream>
int main()
{
std::time_t sys_time
= boost::chrono::system_clock::to_time_t(boost::chrono::system_clock::now());
#ifdef UNDER_CE
// Windows CE does not define asctime()
struct tm * t = std::gmtime(&sys_time);
std::cout
<< "system_clock::to_time_t(system_clock::now()) is "
<< t->tm_mon << "/" << t->tm_mday << "/" << (1900 + t->tm_year) << " " << t->tm_hour << ":" << t->tm_min << ":" << t->tm_sec << std::endl;
#else
std::cout
<< "system_clock::to_time_t(system_clock::now()) is "
<< std::asctime(std::gmtime(&sys_time)) << std::endl;
#endif
return 0;
}

View File

@@ -0,0 +1,20 @@
// stopclock_perf.cpp ---------------------------------------------------//
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
#include "clock_name.hpp"
#include <iostream>
int main()
{
std::cout << name<boost::chrono::system_clock>::apply() << '\n';
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
std::cout << name<boost::chrono::steady_clock>::apply() << '\n';
#endif
std::cout << name<boost::chrono::high_resolution_clock>::apply() << '\n';
}

View File

@@ -0,0 +1,68 @@
// stopclock_perf.cpp ---------------------------------------------------//
// Copyright 2009 Vicente J. Botet Escriba
// Copyright 2009 Howard Hinnant
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
#ifndef BOOST_CHRONO_CLOCK_NAME_HPP
#define BOOST_CHRONO_CLOCK_NAME_HPP
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits/is_same.hpp>
template <typename Clock,
bool = boost::is_same<Clock, boost::chrono::system_clock>::value,
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
bool = boost::is_same<Clock, boost::chrono::steady_clock>::value,
#else
bool = false,
#endif
bool = boost::is_same<Clock, boost::chrono::high_resolution_clock>::value
>
struct name;
template <typename Clock>
struct name<Clock, false, false, false> {
static const char* apply() { return "unknown clock";}
};
template <typename Clock>
struct name<Clock, true, false, false> {
static const char* apply() { return "system_clock";}
};
template <typename Clock>
struct name<Clock, false, true, false> {
static const char* apply() { return "steady_clock";}
};
template <typename Clock>
struct name<Clock, false, false, true> {
static const char* apply() { return "high_resolution_clock";}
};
template <typename Clock>
struct name<Clock, false, true, true> {
static const char* apply() { return "steady_clock and high_resolution_clock";}
};
template <typename Clock>
struct name<Clock, true, false, true> {
static const char* apply() { return "system_clock and high_resolution_clock";}
};
template <typename Clock>
struct name<Clock, true, true, false> {
static const char* apply() { return "system_clock and steady_clock";}
};
template <typename Clock>
struct name<Clock, true, true, true> {
static const char* apply() { return "system_clock, steady_clock and high_resolution_clock";}
};
#endif

View File

@@ -0,0 +1,140 @@
// cycle_count.cpp ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
using namespace boost::chrono;
template <long long speed>
struct cycle_count
{
typedef typename boost::ratio_multiply<boost::ratio<speed>, boost::mega>::type frequency; // Mhz
typedef typename boost::ratio_divide<boost::ratio<1>, frequency>::type period;
typedef long long rep;
typedef boost::chrono::duration<rep, period> duration;
typedef boost::chrono::time_point<cycle_count> time_point;
static time_point now()
{
static long long tick = 0;
// return exact cycle count
return time_point(duration(++tick)); // fake access to clock cycle count
}
};
template <long long speed>
struct approx_cycle_count
{
static const long long frequency = speed * 1000000; // MHz
typedef nanoseconds duration;
typedef duration::rep rep;
typedef duration::period period;
static const long long nanosec_per_sec = period::den;
typedef boost::chrono::time_point<approx_cycle_count> time_point;
static time_point now()
{
static long long tick = 0;
// return cycle count as an approximate number of nanoseconds
// compute as if nanoseconds is only duration in the std::lib
return time_point(duration(++tick * nanosec_per_sec / frequency));
}
};
void cycle_count_delay()
{
{
typedef cycle_count<400> clock;
std::cout << "\nSimulated " << clock::frequency::num / boost::mega::num << "MHz clock which has a tick period of "
<< duration<double, boost::nano>(clock::duration(1)).count() << " nanoseconds\n";
nanoseconds delayns(500);
clock::duration delay = duration_cast<clock::duration>(delayns);
std::cout << "delay = " << delayns.count() << " nanoseconds which is " << delay.count() << " cycles\n";
clock::time_point start = clock::now();
clock::time_point stop = start + delay;
while (clock::now() < stop) // no multiplies or divides in this loop
;
clock::time_point end = clock::now();
clock::duration elapsed = end - start;
std::cout << "paused " << elapsed.count() << " cycles ";
std::cout << "which is " << duration_cast<nanoseconds>(elapsed).count() << " nanoseconds\n";
}
{
typedef approx_cycle_count<400> clock;
std::cout << "\nSimulated " << clock::frequency / 1000000 << "MHz clock modeled with nanoseconds\n";
clock::duration delay = nanoseconds(500);
std::cout << "delay = " << delay.count() << " nanoseconds\n";
clock::time_point start = clock::now();
clock::time_point stop = start + delay;
while (clock::now() < stop) // 1 multiplication and 1 division in this loop
;
clock::time_point end = clock::now();
clock::duration elapsed = end - start;
std::cout << "paused " << elapsed.count() << " nanoseconds\n";
}
{
typedef cycle_count<1500> clock;
std::cout << "\nSimulated " << clock::frequency::num / boost::mega::num << "MHz clock which has a tick period of "
<< duration<double, boost::nano>(clock::duration(1)).count() << " nanoseconds\n";
nanoseconds delayns(500);
clock::duration delay = duration_cast<clock::duration>(delayns);
std::cout << "delay = " << delayns.count() << " nanoseconds which is " << delay.count() << " cycles\n";
clock::time_point start = clock::now();
clock::time_point stop = start + delay;
while (clock::now() < stop) // no multiplies or divides in this loop
;
clock::time_point end = clock::now();
clock::duration elapsed = end - start;
std::cout << "paused " << elapsed.count() << " cycles ";
std::cout << "which is " << duration_cast<nanoseconds>(elapsed).count() << " nanoseconds\n";
}
{
typedef approx_cycle_count<1500> clock;
std::cout << "\nSimulated " << clock::frequency / 1000000 << "MHz clock modeled with nanoseconds\n";
clock::duration delay = nanoseconds(500);
std::cout << "delay = " << delay.count() << " nanoseconds\n";
clock::time_point start = clock::now();
clock::time_point stop = start + delay;
while (clock::now() < stop) // 1 multiplication and 1 division in this loop
;
clock::time_point end = clock::now();
clock::duration elapsed = end - start;
std::cout << "paused " << elapsed.count() << " nanoseconds\n";
}
}
int main()
{
cycle_count_delay();
return 0;
}

View File

@@ -0,0 +1,60 @@
// explore_limits.cpp ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
using namespace boost::chrono;
void explore_limits()
{
typedef duration<long long, boost::ratio_multiply<boost::ratio<24*3652425,10000>,
hours::period>::type> Years;
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
steady_clock::time_point t1( Years(250));
steady_clock::time_point t2(-Years(250));
#else
system_clock::time_point t1( Years(250));
system_clock::time_point t2(-Years(250));
#endif
// nanosecond resolution is likely to overflow. "up cast" to microseconds.
// The "up cast" trades precision for range.
microseconds d = time_point_cast<microseconds>(t1) - time_point_cast<microseconds>(t2);
std::cout << d.count() << " microseconds\n";
}
int main()
{
explore_limits();
return 0;
}

View File

@@ -0,0 +1,130 @@
// french.cpp ----------------------------------------------------------//
// Copyright 2010 Howard Hinnant
// Copyright 2011 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// Adapted to Boost from the original Hawards's code
#include <boost/chrono/config.hpp>
#include <boost/chrono/chrono_io.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
#include <boost/chrono/thread_clock.hpp>
#include <iostream>
#include <locale>
#if BOOST_CHRONO_VERSION==2
#include <boost/chrono/io/duration_units.hpp>
using namespace boost;
using namespace boost::chrono;
template <typename CharT=char>
class duration_units_fr: public duration_units_default<CharT>
{
public:
typedef CharT char_type;
explicit duration_units_fr(size_t refs = 0) :
duration_units_default<CharT>(refs)
{
}
protected:
using duration_units_default<CharT>::do_get_unit;
std::size_t do_get_plural_form(boost::int_least64_t value) const
{
return (value == -1 || value == 0 || value == 1) ? 0 : 1;
}
std::basic_string<CharT> do_get_unit(duration_style style, ratio<1> , std::size_t pf) const
{
static const CharT t[] =
{ 's' };
static const std::basic_string<CharT> symbol(t, t + sizeof (t) / sizeof (t[0]));
static const CharT u[] =
{ 's', 'e', 'c', 'o', 'n', 'd', 'e' };
static const std::basic_string<CharT> singular(u, u + sizeof (u) / sizeof (u[0]));
static const CharT v[] =
{ 's', 'e', 'c', 'o', 'n', 'd', 'e', 's' };
static const std::basic_string<CharT> plural(v, v + sizeof (v) / sizeof (v[0]));
if (style == duration_style::symbol) return symbol;
if (pf == 0) return singular;
if (pf == 1) return plural;
// assert
//throw "exception";
return "";
}
std::basic_string<CharT> do_get_unit(duration_style style, ratio<60> , std::size_t pf) const
{
static const CharT t[] =
{ 'm', 'i', 'n' };
static const std::basic_string<CharT> symbol(t, t + sizeof (t) / sizeof (t[0]));
static const CharT u[] =
{ 'm', 'i', 'n', 'u', 't', 'e' };
static const std::basic_string<CharT> singular(u, u + sizeof (u) / sizeof (u[0]));
static const CharT v[] =
{ 'm', 'i', 'n', 'u', 't', 'e', 's' };
static const std::basic_string<CharT> plural(v, v + sizeof (v) / sizeof (v[0]));
if (style == duration_style::symbol) return symbol;
if (pf == 0) return singular;
if (pf == 1) return plural;
// assert
//throw "exception";
return "";
}
std::basic_string<CharT> do_get_unit(duration_style style, ratio<3600> , std::size_t pf) const
{
static const CharT t[] =
{ 'h' };
static const std::basic_string<CharT> symbol(t, t + sizeof (t) / sizeof (t[0]));
static const CharT u[] =
{ 'h', 'e', 'u', 'r', 'e' };
static const std::basic_string<CharT> singular(u, u + sizeof (u) / sizeof (u[0]));
static const CharT v[] =
{ 'h', 'e', 'u', 'r', 'e', 's' };
static const std::basic_string<CharT> plural(v, v + sizeof (v) / sizeof (v[0]));
if (style == duration_style::symbol) return symbol;
if (pf == 0) return singular;
if (pf == 1) return plural;
// assert
//throw "exception";
return "";
}
};
#endif
int main()
{
using std::cout;
using std::locale;
using namespace boost;
using namespace boost::chrono;
#if BOOST_CHRONO_VERSION==2
cout.imbue(locale(locale(), new duration_units_fr<>()));
#else
cout.imbue(locale(locale(), new duration_punct<char>
(
duration_punct<char>::use_long,
"secondes", "minutes", "heures",
"s", "m", "h"
)));
#endif
hours h(5);
minutes m(45);
seconds s(15);
milliseconds ms(763);
cout << h << ", " << m << ", " << s << " et " << ms << '\n';
cout << hours(0) << ", " << minutes(0) << ", " << s << " et " << ms << '\n';
return 0;
}

View File

@@ -0,0 +1,97 @@
// i_dont_like_the_default_duration_behavior.cpp ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
namespace I_dont_like_the_default_duration_behavior
{
// Here's how you override the duration's default constructor to do anything you want (in this case zero)
template <class R>
class zero_default
{
public:
typedef R rep;
private:
rep rep_;
public:
zero_default(rep i = 0) : rep_(i) {}
operator rep() const {return rep_;}
zero_default& operator+=(zero_default x) {rep_ += x.rep_; return *this;}
zero_default& operator-=(zero_default x) {rep_ -= x.rep_; return *this;}
zero_default& operator*=(zero_default x) {rep_ *= x.rep_; return *this;}
zero_default& operator/=(zero_default x) {rep_ /= x.rep_; return *this;}
zero_default operator+ () const {return *this;}
zero_default operator- () const {return zero_default(-rep_);}
zero_default& operator++() {++rep_; return *this;}
zero_default operator++(int) {return zero_default(rep_++);}
zero_default& operator--() {--rep_; return *this;}
zero_default operator--(int) {return zero_default(rep_--);}
friend zero_default operator+(zero_default x, zero_default y) {return x += y;}
friend zero_default operator-(zero_default x, zero_default y) {return x -= y;}
friend zero_default operator*(zero_default x, zero_default y) {return x *= y;}
friend zero_default operator/(zero_default x, zero_default y) {return x /= y;}
friend bool operator==(zero_default x, zero_default y) {return x.rep_ == y.rep_;}
friend bool operator!=(zero_default x, zero_default y) {return !(x == y);}
friend bool operator< (zero_default x, zero_default y) {return x.rep_ < y.rep_;}
friend bool operator<=(zero_default x, zero_default y) {return !(y < x);}
friend bool operator> (zero_default x, zero_default y) {return y < x;}
friend bool operator>=(zero_default x, zero_default y) {return !(x < y);}
};
typedef boost::chrono::duration<zero_default<long long>, boost::nano > nanoseconds;
typedef boost::chrono::duration<zero_default<long long>, boost::micro > microseconds;
typedef boost::chrono::duration<zero_default<long long>, boost::milli > milliseconds;
typedef boost::chrono::duration<zero_default<long long> > seconds;
typedef boost::chrono::duration<zero_default<long long>, boost::ratio<60> > minutes;
typedef boost::chrono::duration<zero_default<long long>, boost::ratio<3600> > hours;
void test()
{
milliseconds ms;
std::cout << ms.count() << '\n';
}
} // I_dont_like_the_default_duration_behavior
int main()
{
I_dont_like_the_default_duration_behavior::test();
return 0;
}

View File

@@ -0,0 +1,87 @@
// io_ex1.cpp ----------------------------------------------------------//
// Copyright 2010 Howard Hinnant
// Copyright 2010 Vicente J. Botet Escriba
// Copyright (c) Microsoft Corporation 2014
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was adapted by Vicente J. Botet Escriba from Hinnant's html documentation.
Many thanks to Howard for making his code available under the Boost license.
*/
#include <iostream>
#include <boost/chrono/config.hpp>
#include <boost/chrono/chrono_io.hpp>
#include <boost/chrono/system_clocks.hpp>
#include <boost/chrono/thread_clock.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
int main()
{
using std::cout;
using namespace boost;
using namespace boost::chrono;
cout << "milliseconds(1) = "
<< milliseconds(1) << '\n';
cout << "milliseconds(3) + microseconds(10) = "
<< milliseconds(3) + microseconds(10) << '\n';
cout << "hours(3) + minutes(10) = "
<< hours(3) + minutes(10) << '\n';
typedef duration<long long, ratio<1, 2500000000ULL> > ClockTick;
cout << "ClockTick(3) + nanoseconds(10) = "
<< ClockTick(3) + nanoseconds(10) << '\n';
cout << "\nSet cout to use short names:\n";
#if BOOST_CHRONO_VERSION==2
cout << duration_fmt(duration_style::symbol);
#else
cout << duration_short;
#endif
cout << "milliseconds(3) + microseconds(10) = "
<< milliseconds(3) + microseconds(10) << '\n';
cout << "hours(3) + minutes(10) = "
<< hours(3) + minutes(10) << '\n';
cout << "ClockTick(3) + nanoseconds(10) = "
<< ClockTick(3) + nanoseconds(10) << '\n';
cout << "\nsystem_clock::now() = " << system_clock::now() << '\n';
#if defined _MSC_VER && _MSC_VER == 1700
#else
#if BOOST_CHRONO_VERSION==2
cout << "\nsystem_clock::now() = " << time_fmt(chrono::timezone::local) << system_clock::now() << '\n';
cout << "\nsystem_clock::now() = " << time_fmt(chrono::timezone::local,"%Y/%m/%d") << system_clock::now() << '\n';
#endif
#endif
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
cout << "steady_clock::now() = " << steady_clock::now() << '\n';
#endif
#if BOOST_CHRONO_VERSION==2
cout << "\nSet cout to use long names:\n" << duration_fmt(duration_style::prefix)
<< "high_resolution_clock::now() = " << high_resolution_clock::now() << '\n';
#else
cout << "\nSet cout to use long names:\n" << duration_long
<< "high_resolution_clock::now() = " << high_resolution_clock::now() << '\n';
#endif
#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
cout << "\nthread_clock::now() = " << thread_clock::now() << '\n';
#endif
#if defined(BOOST_CHRONO_HAS_PROCESS_CLOCKS)
cout << "\nprocess_real_cpu_clock::now() = " << process_real_cpu_clock::now() << '\n';
#if BOOST_PLAT_WINDOWS_DESKTOP
cout << "\nprocess_user_cpu_clock::now() = " << process_user_cpu_clock::now() << '\n';
cout << "\nprocess_system_cpu_clock::now() = " << process_system_cpu_clock::now() << '\n';
cout << "\nprocess_cpu_clock::now() = " << process_cpu_clock::now() << '\n';
#endif
#endif
return 0;
}

View File

@@ -0,0 +1,36 @@
// io_ex2.cpp ----------------------------------------------------------//
// Copyright 2010 Howard Hinnant
// Copyright 2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was adapted by Vicente J. Botet Escriba from Hinnant's html documentation.
Many thanks to Howard for making his code available under the Boost license.
*/
#include <boost/chrono/chrono_io.hpp>
#include <sstream>
#include <boost/assert.hpp>
int main()
{
using namespace boost::chrono;
std::istringstream in("5000 milliseconds 4000 ms 3001 ms");
seconds d(0);
in >> d;
BOOST_ASSERT(in.good());
BOOST_ASSERT(d == seconds(5));
in >> d;
BOOST_ASSERT(in.good());
BOOST_ASSERT(d == seconds(4));
in >> d;
BOOST_ASSERT(in.fail());
BOOST_ASSERT(d == seconds(4));
return 0;
}

View File

@@ -0,0 +1,48 @@
// io_ex1.cpp ----------------------------------------------------------//
// Copyright 2010 Howard Hinnant
// Copyright 2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was adapted by Vicente J. Botet Escriba from Hinnant's html documentation.
Many thanks to Howard for making his code available under the Boost license.
*/
#include <boost/chrono/chrono_io.hpp>
#include <sstream>
#include <iostream>
#include <boost/assert.hpp>
int main()
{
using namespace boost::chrono;
using std::cout;
high_resolution_clock::time_point t0 = high_resolution_clock::now();
std::stringstream io;
io << t0;
BOOST_ASSERT(!io.fail());
cout << io.str() << '\n';
BOOST_ASSERT(!io.fail());
high_resolution_clock::time_point t1;
io >> t1;
BOOST_ASSERT(!io.fail());
cout << io.str() << '\n';
cout << t0 << '\n';
cout << t1 << '\n';
high_resolution_clock::time_point t = high_resolution_clock::now();
cout << t << '\n';
cout << "That took " << t - t0 << '\n';
cout << "That took " << t - t1 << '\n';
return 0;
}
//~ 50908679121461 nanoseconds since boot
//~ That took 649630 nanoseconds

View File

@@ -0,0 +1,32 @@
// io_ex1.cpp ----------------------------------------------------------//
// Copyright 2010 Howard Hinnant
// Copyright 2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was adapted by Vicente J. Botet Escriba from Hinnant's html documentation.
Many thanks to Howard for making his code available under the Boost license.
*/
#include <boost/chrono/chrono_io.hpp>
#include <iostream>
int main()
{
using std::cout;
using namespace boost;
using namespace boost::chrono;
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
typedef time_point<steady_clock, duration<double, ratio<3600> > > T;
T tp = steady_clock::now();
std::cout << tp << '\n';
#endif
return 0;
}
//~ 17.8666 hours since boot

View File

@@ -0,0 +1,90 @@
// io_ex1.cpp ----------------------------------------------------------//
// Copyright 2010 Howard Hinnant
// Copyright 2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was adapted by Vicente J. Botet Escriba from Hinnant's html documentation.
Many thanks to Howard for making his code available under the Boost license.
*/
#include <boost/chrono/chrono_io.hpp>
#include <ostream>
#include <iostream>
// format duration as [-]d/hh::mm::ss.cc
template <class CharT, class Traits, class Rep, class Period>
std::basic_ostream<CharT, Traits>&
display(std::basic_ostream<CharT, Traits>& os,
boost::chrono::duration<Rep, Period> d)
{
using std::cout;
using namespace boost;
using namespace boost::chrono;
typedef duration<long long, ratio<86400> > days;
typedef duration<long long, centi> centiseconds;
// if negative, print negative sign and negate
if (d < duration<Rep, Period>(0))
{
d = -d;
os << '-';
}
// round d to nearest centiseconds, to even on tie
centiseconds cs = duration_cast<centiseconds>(d);
if (d - cs > milliseconds(5)
|| (d - cs == milliseconds(5) && cs.count() & 1))
++cs;
// separate seconds from centiseconds
seconds s = duration_cast<seconds>(cs);
cs -= s;
// separate minutes from seconds
minutes m = duration_cast<minutes>(s);
s -= m;
// separate hours from minutes
hours h = duration_cast<hours>(m);
m -= h;
// separate days from hours
days dy = duration_cast<days>(h);
h -= dy;
// print d/hh:mm:ss.cc
os << dy.count() << '/';
if (h < hours(10))
os << '0';
os << h.count() << ':';
if (m < minutes(10))
os << '0';
os << m.count() << ':';
if (s < seconds(10))
os << '0';
os << s.count() << '.';
if (cs < centiseconds(10))
os << '0';
os << cs.count();
return os;
}
int main()
{
using std::cout;
using namespace boost;
using namespace boost::chrono;
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
display(cout, steady_clock::now().time_since_epoch()
+ duration<long, mega>(1)) << '\n';
#endif
display(cout, -milliseconds(6)) << '\n';
display(cout, duration<long, mega>(1)) << '\n';
display(cout, -duration<long, mega>(1)) << '\n';
}
//~ 12/06:03:22.95
//~ -0/00:00:00.01
//~ 11/13:46:40.00
//~ -11/13:46:40.00

View File

@@ -0,0 +1,61 @@
// manipulate_clock_object.cpp ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
using namespace boost::chrono;
#if defined _MSC_VER
#pragma warning(push)
#pragma warning(disable:4100)
#endif
void manipulate_clock_object(system_clock clock)
#if defined _MSC_VER
#pragma warning(pop)
#endif
{
system_clock::duration delay = milliseconds(5);
system_clock::time_point start = clock.now();
while ((clock.now() - start) <= delay) {}
system_clock::time_point stop = clock.now();
system_clock::duration elapsed = stop - start;
std::cout << "paused " << nanoseconds(elapsed).count() << " nanoseconds\n";
}
int main()
{
manipulate_clock_object(system_clock());
return 0;
}

View File

@@ -0,0 +1,79 @@
// min_time_point.cpp ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#include <boost/chrono/typeof/boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
using namespace boost::chrono;
template <class Rep, class Period>
void print_duration(std::ostream& os, duration<Rep, Period> d)
{
os << d.count() << " * " << Period::num << '/' << Period::den << " seconds\n";
}
namespace my_ns {
// Example min utility: returns the earliest time_point
// Being able to *easily* write this function is a major feature!
template <class Clock, class Duration1, class Duration2>
inline
typename boost::common_type<time_point<Clock, Duration1>,
time_point<Clock, Duration2> >::type
min BOOST_PREVENT_MACRO_SUBSTITUTION (time_point<Clock, Duration1> t1, time_point<Clock, Duration2> t2)
{
return t2 < t1 ? t2 : t1;
}
}
void test_min()
{
#if 1
typedef time_point<system_clock,
boost::common_type<system_clock::duration, seconds>::type> T1;
typedef time_point<system_clock,
boost::common_type<system_clock::duration, nanoseconds>::type> T2;
typedef boost::common_type<T1, T2>::type T3;
/*auto*/ T1 t1 = system_clock::now() + seconds(3);
/*auto*/ T2 t2 = system_clock::now() + nanoseconds(3);
/*auto*/ T3 t3 = (my_ns::min)(t1, t2);
#else
BOOST_AUTO(t1, system_clock::now() + seconds(3));
BOOST_AUTO(t2, system_clock::now() + nanoseconds(3));
BOOST_AUTO(t3, (min)(t1, t2));
#endif
print_duration(std::cout, t1 - t3);
print_duration(std::cout, t2 - t3);
}
int main()
{
test_min();
return 0;
}

View File

@@ -0,0 +1,156 @@
// miscellaneous.cpp ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
// miscellaneous tests and demos:
#include <cassert>
#include <iostream>
using namespace boost::chrono;
void physics_function(duration<double> d)
{
std::cout << "d = " << d.count() << '\n';
}
void drive_physics_function()
{
physics_function(nanoseconds(3));
physics_function(hours(3));
physics_function(duration<double>(2./3));
std::cout.precision(16);
physics_function( hours(3) + nanoseconds(-3) );
}
void test_range()
{
using namespace boost::chrono;
hours h1 = hours(24 * ( 365 * 292 + 292/4));
nanoseconds n1 = h1 + nanoseconds(1);
nanoseconds delta = n1 - h1;
std::cout << "292 years of hours = " << h1.count() << "hr\n";
std::cout << "Add a nanosecond = " << n1.count() << "ns\n";
std::cout << "Find the difference = " << delta.count() << "ns\n";
}
void test_extended_range()
{
using namespace boost::chrono;
hours h1 = hours(24 * ( 365 * 244000 + 244000/4));
/*auto*/ microseconds u1 = h1 + microseconds(1);
/*auto*/ microseconds delta = u1 - h1;
std::cout << "244,000 years of hours = " << h1.count() << "hr\n";
std::cout << "Add a microsecond = " << u1.count() << "us\n";
std::cout << "Find the difference = " << delta.count() << "us\n";
}
template <class Rep, class Period>
void inspect_duration(boost::chrono::duration<Rep, Period> d, const std::string& name)
{
typedef boost::chrono::duration<Rep, Period> Duration;
std::cout << "********* " << name << " *********\n";
std::cout << "The period of " << name << " is " << (double)Period::num/Period::den << " seconds.\n";
std::cout << "The frequency of " << name << " is " << (double)Period::den/Period::num << " Hz.\n";
std::cout << "The representation is ";
if (boost::is_floating_point<Rep>::value)
{
std::cout << "floating point\n";
std::cout << "The precision is the most significant ";
std::cout << std::numeric_limits<Rep>::digits10 << " decimal digits.\n";
}
else if (boost::is_integral<Rep>::value)
{
std::cout << "integral\n";
d = Duration(Rep(1));
boost::chrono::duration<double> dsec = d;
std::cout << "The precision is " << dsec.count() << " seconds.\n";
}
else
{
std::cout << "a class type\n";
d = Duration(Rep(1));
boost::chrono::duration<double> dsec = d;
std::cout << "The precision is " << dsec.count() << " seconds.\n";
}
d = Duration((std::numeric_limits<Rep>::max)());
using namespace boost::chrono;
typedef duration<double, boost::ratio_multiply<boost::ratio<24*3652425,10000>, hours::period>::type> Years;
Years years = d;
std::cout << "The range is +/- " << years.count() << " years.\n";
std::cout << "sizeof(" << name << ") = " << sizeof(d) << '\n';
}
void inspect_all()
{
using namespace boost::chrono;
std::cout.precision(6);
inspect_duration(nanoseconds(), "nanoseconds");
inspect_duration(microseconds(), "microseconds");
inspect_duration(milliseconds(), "milliseconds");
inspect_duration(seconds(), "seconds");
inspect_duration(minutes(), "minutes");
inspect_duration(hours(), "hours");
inspect_duration(duration<double>(), "duration<double>");
}
void test_milliseconds()
{
using namespace boost::chrono;
milliseconds ms(250);
ms += milliseconds(1);
milliseconds ms2(150);
milliseconds msdiff = ms - ms2;
if (msdiff == milliseconds(101))
std::cout << "success\n";
else
std::cout << "failure: " << msdiff.count() << '\n';
}
int main()
{
using namespace boost;
drive_physics_function();
test_range();
test_extended_range();
inspect_all();
test_milliseconds();
inspect_duration(common_type<duration<double>, hours, microseconds>::type(),
"common_type<duration<double>, hours, microseconds>::type");
duration<double, boost::milli> d = milliseconds(3) * 2.5;
inspect_duration(milliseconds(3) * 2.5, "milliseconds(3) * 2.5");
std::cout << d.count() << '\n';
// milliseconds ms(3.5); // doesn't compile
// std::cout << "milliseconds ms(3.5) doesn't compile\n";
return 0;
}

View File

@@ -0,0 +1,44 @@
// french.cpp ----------------------------------------------------------//
// Copyright 2010 Howard Hinnant
// Copyright 2011 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// Adapted to Boost from the original Hawards's code
#include <iostream>
//#include <boost/chrono/chrono_io.hpp>
#include <boost/chrono/floor.hpp>
#include <boost/chrono/round.hpp>
#include <boost/chrono/ceil.hpp>
int main()
{
boost::chrono::milliseconds ms(2500);
std::cout << __FILE__ << "[" << __LINE__ << "]" << std::endl;
std::cout << boost::chrono::floor<boost::chrono::seconds>(ms).count()
<< " seconds\n";
std::cout << __FILE__ << "[" << __LINE__ << "]" << std::endl;
std::cout << boost::chrono::round<boost::chrono::seconds>(ms).count()
<< " seconds\n";
std::cout << __FILE__ << "[" << __LINE__ << "]" << std::endl;
std::cout << boost::chrono::ceil<boost::chrono::seconds>(ms).count()
<< " seconds\n";
std::cout << __FILE__ << "[" << __LINE__ << "]" << std::endl;
ms = boost::chrono::milliseconds(2516);
std::cout << __FILE__ << "[" << __LINE__ << "]" << std::endl;
typedef boost::chrono::duration<long, boost::ratio<1, 30> > frame_rate;
std::cout << __FILE__ << "[" << __LINE__ << "]" << std::endl;
std::cout << boost::chrono::floor<frame_rate>(ms).count()
<< " [1/30] seconds\n";
std::cout << __FILE__ << "[" << __LINE__ << "]" << std::endl;
std::cout << boost::chrono::round<frame_rate>(ms).count()
<< " [1/30] seconds\n";
std::cout << __FILE__ << "[" << __LINE__ << "]" << std::endl;
std::cout << boost::chrono::ceil<frame_rate>(ms).count()
<< " [1/30] seconds\n";
std::cout << __FILE__ << "[" << __LINE__ << "]" << std::endl;
return 0;
}

View File

@@ -0,0 +1,22 @@
// run_timer_example.cpp ---------------------------------------------------//
// Copyright Beman Dawes 2006, 2008
// Copyright 2009/2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
#include <boost/chrono/process_times.hpp>
#include <cmath>
int main()
{
boost::chrono::run_timer t;
for ( long i = 0; i < 10000; ++i )
std::sqrt( 123.456L ); // burn some time
return 0;
}

View File

@@ -0,0 +1,24 @@
// run_timer_example.cpp ---------------------------------------------------//
// Copyright Beman Dawes 2006, 2008
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
#include <boost/chrono/process_times.hpp>
#include <cmath>
int main( int argc, char * argv[] )
{
const char * format = argc > 1 ? argv[1] : "%t cpu seconds\n";
int places = argc > 2 ? std::atoi( argv[2] ) : 2;
boost::chrono::run_timer t( format, places );
for ( long i = 0; i < 10000; ++i )
std::sqrt( 123.456L ); // burn some time
return 0;
}

View File

@@ -0,0 +1,244 @@
// runtime_resolution.cpp ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009 Vicente J. Botet Escriba
// Copyright (c) Microsoft Corporation 2014
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#define _CRT_SECURE_NO_WARNINGS // disable VC++ foolishness
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
#if defined(BOOST_CHRONO_MAC_API)
#include <sys/time.h> //for gettimeofday and timeval
#include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t
#endif
#if defined(BOOST_CHRONO_WINDOWS_API)
#include <windows.h>
namespace
{
#if defined UNDER_CE || BOOST_PLAT_WINDOWS_RUNTIME
// Windows CE and Windows store does not define timeval
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* and microseconds */
};
#endif
int gettimeofday(struct timeval * tp, void *)
{
FILETIME ft;
#if defined(UNDER_CE)
// Windows CE does not define GetSystemTimeAsFileTime so we do it in two steps.
SYSTEMTIME st;
::GetSystemTime( &st );
::SystemTimeToFileTime( &st, &ft );
#else
::GetSystemTimeAsFileTime( &ft ); // never fails
#endif
long long t = (static_cast<long long>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
# if !defined( BOOST_MSVC ) || BOOST_MSVC > 1300 // > VC++ 7.0
t -= 116444736000000000LL;
# else
t -= 116444736000000000;
# endif
t /= 10; // microseconds
tp->tv_sec = static_cast<long>( t / 1000000UL);
tp->tv_usec = static_cast<long>( t % 1000000UL);
return 0;
}
} // unnamed namespace
#endif
// Handle duration with resolution not known until run time
using namespace boost::chrono;
namespace runtime_resolution
{
class duration
{
public:
typedef long long rep;
private:
rep rep_;
static const double ticks_per_nanosecond;
public:
typedef boost::chrono::duration<double, boost::nano> tonanosec;
duration() {} // = default;
explicit duration(const rep& r) : rep_(r) {}
// conversions
explicit duration(const tonanosec& d)
: rep_(static_cast<rep>(d.count() * ticks_per_nanosecond)) {}
// explicit
tonanosec convert_to_nanosec() const {return tonanosec(rep_/ticks_per_nanosecond);}
// observer
rep count() const {return rep_;}
// arithmetic
duration& operator+=(const duration& d) {rep_ += d.rep_; return *this;}
duration& operator-=(const duration& d) {rep_ += d.rep_; return *this;}
duration& operator*=(rep rhs) {rep_ *= rhs; return *this;}
duration& operator/=(rep rhs) {rep_ /= rhs; return *this;}
duration operator+() const {return *this;}
duration operator-() const {return duration(-rep_);}
duration& operator++() {++rep_; return *this;}
duration operator++(int) {return duration(rep_++);}
duration& operator--() {--rep_; return *this;}
duration operator--(int) {return duration(rep_--);}
friend duration operator+(duration x, duration y) {return x += y;}
friend duration operator-(duration x, duration y) {return x -= y;}
friend duration operator*(duration x, rep y) {return x *= y;}
friend duration operator*(rep x, duration y) {return y *= x;}
friend duration operator/(duration x, rep y) {return x /= y;}
friend bool operator==(duration x, duration y) {return x.rep_ == y.rep_;}
friend bool operator!=(duration x, duration y) {return !(x == y);}
friend bool operator< (duration x, duration y) {return x.rep_ < y.rep_;}
friend bool operator<=(duration x, duration y) {return !(y < x);}
friend bool operator> (duration x, duration y) {return y < x;}
friend bool operator>=(duration x, duration y) {return !(x < y);}
};
static
double
init_duration()
{
#if defined(BOOST_CHRONO_WINDOWS_API)
return static_cast<double>(1) / 1000; // Windows FILETIME is 1 per microsec
#elif defined(BOOST_CHRONO_MAC_API)
mach_timebase_info_data_t MachInfo;
mach_timebase_info(&MachInfo);
return static_cast<double>(MachInfo.denom) / MachInfo.numer;
#elif defined(BOOST_CHRONO_POSIX_API)
return static_cast<double>(1) / 1000;
#endif
}
const double duration::ticks_per_nanosecond = init_duration();
class clock;
class time_point
{
public:
typedef runtime_resolution::clock clock;
typedef long long rep;
private:
rep rep_;
rep count() const {return rep_;}
public:
time_point() : rep_(0) {}
explicit time_point(const duration& d)
: rep_(d.count()) {}
// arithmetic
time_point& operator+=(const duration& d) {rep_ += d.count(); return *this;}
time_point& operator-=(const duration& d) {rep_ -= d.count(); return *this;}
friend time_point operator+(time_point x, duration y) {return x += y;}
friend time_point operator+(duration x, time_point y) {return y += x;}
friend time_point operator-(time_point x, duration y) {return x -= y;}
friend duration operator-(time_point x, time_point y) {return duration(x.rep_ - y.rep_);}
};
class clock
{
public:
typedef runtime_resolution::duration::rep rep;
typedef runtime_resolution::duration duration;
typedef runtime_resolution::time_point time_point;
static time_point now()
{
#if defined(BOOST_CHRONO_WINDOWS_API)
timeval tv;
gettimeofday( &tv, 0 );
return time_point(duration((static_cast<rep>(tv.tv_sec)<<32) | tv.tv_usec));
#elif defined(BOOST_CHRONO_MAC_API)
timeval tv;
gettimeofday( &tv, 0 );
return time_point(duration((static_cast<rep>(tv.tv_sec)<<32) | tv.tv_usec));
#elif defined(BOOST_CHRONO_POSIX_API)
timespec ts;
::clock_gettime( CLOCK_REALTIME, &ts );
return time_point(duration((static_cast<rep>(ts.tv_sec)<<32) | ts.tv_nsec/1000));
#endif // POSIX
}
};
void test()
{
std::cout << "runtime_resolution test\n";
clock::duration delay(boost::chrono::milliseconds(5));
clock::time_point start = clock::now();
while (clock::now() - start <= delay)
;
clock::time_point stop = clock::now();
clock::duration elapsed = stop - start;
std::cout << "paused " <<
boost::chrono::nanoseconds(
boost::chrono::duration_cast<boost::chrono::nanoseconds>( elapsed.convert_to_nanosec() )).count()
<< " nanoseconds\n";
}
} // runtime_resolution
int main()
{
runtime_resolution::test();
return 0;
}

View File

@@ -0,0 +1,505 @@
// saturating.cpp ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#define _CRT_SECURE_NO_WARNINGS // disable VC++ foolishness
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
//////////////////////////////////////////////////////////
//////////////////// User2 Example ///////////////////////
//////////////////////////////////////////////////////////
// Demonstrate User2:
// A "saturating" signed integral type is developed. This type has +/- infinity and a nan
// (like IEEE floating point) but otherwise obeys signed integral arithmetic.
// This class is subsequently used as the rep in boost::chrono::duration to demonstrate a
// duration class that does not silently ignore overflow.
#include <ostream>
#include <stdexcept>
#include <climits>
namespace User2
{
template <class I>
class saturate
{
public:
typedef I int_type;
static const int_type nan = int_type(int_type(1) << (sizeof(int_type) * CHAR_BIT - 1));
static const int_type neg_inf = nan + 1;
static const int_type pos_inf = -neg_inf;
private:
int_type i_;
// static_assert(std::is_integral<int_type>::value && std::is_signed<int_type>::value,
// "saturate only accepts signed integral types");
// static_assert(nan == -nan && neg_inf < pos_inf,
// "saturate assumes two's complement hardware for signed integrals");
public:
saturate() : i_(nan) {}
explicit saturate(int_type i) : i_(i) {}
// explicit
operator int_type() const;
saturate& operator+=(saturate x);
saturate& operator-=(saturate x) {return *this += -x;}
saturate& operator*=(saturate x);
saturate& operator/=(saturate x);
saturate& operator%=(saturate x);
saturate operator- () const {return saturate(-i_);}
saturate& operator++() {*this += saturate(int_type(1)); return *this;}
saturate operator++(int) {saturate tmp(*this); ++(*this); return tmp;}
saturate& operator--() {*this -= saturate(int_type(1)); return *this;}
saturate operator--(int) {saturate tmp(*this); --(*this); return tmp;}
friend saturate operator+(saturate x, saturate y) {return x += y;}
friend saturate operator-(saturate x, saturate y) {return x -= y;}
friend saturate operator*(saturate x, saturate y) {return x *= y;}
friend saturate operator/(saturate x, saturate y) {return x /= y;}
friend saturate operator%(saturate x, saturate y) {return x %= y;}
friend bool operator==(saturate x, saturate y)
{
if (x.i_ == nan || y.i_ == nan)
return false;
return x.i_ == y.i_;
}
friend bool operator!=(saturate x, saturate y) {return !(x == y);}
friend bool operator<(saturate x, saturate y)
{
if (x.i_ == nan || y.i_ == nan)
return false;
return x.i_ < y.i_;
}
friend bool operator<=(saturate x, saturate y)
{
if (x.i_ == nan || y.i_ == nan)
return false;
return x.i_ <= y.i_;
}
friend bool operator>(saturate x, saturate y)
{
if (x.i_ == nan || y.i_ == nan)
return false;
return x.i_ > y.i_;
}
friend bool operator>=(saturate x, saturate y)
{
if (x.i_ == nan || y.i_ == nan)
return false;
return x.i_ >= y.i_;
}
friend std::ostream& operator<<(std::ostream& os, saturate s)
{
switch (s.i_)
{
case pos_inf:
return os << "inf";
case nan:
return os << "nan";
case neg_inf:
return os << "-inf";
};
return os << s.i_;
}
};
template <class I>
saturate<I>::operator I() const
{
switch (i_)
{
case nan:
case neg_inf:
case pos_inf:
throw std::out_of_range("saturate special value can not convert to int_type");
}
return i_;
}
template <class I>
saturate<I>&
saturate<I>::operator+=(saturate x)
{
switch (i_)
{
case pos_inf:
switch (x.i_)
{
case neg_inf:
case nan:
i_ = nan;
}
return *this;
case nan:
return *this;
case neg_inf:
switch (x.i_)
{
case pos_inf:
case nan:
i_ = nan;
}
return *this;
}
switch (x.i_)
{
case pos_inf:
case neg_inf:
case nan:
i_ = x.i_;
return *this;
}
if (x.i_ >= 0)
{
if (i_ < pos_inf - x.i_)
i_ += x.i_;
else
i_ = pos_inf;
return *this;
}
if (i_ > neg_inf - x.i_)
i_ += x.i_;
else
i_ = neg_inf;
return *this;
}
template <class I>
saturate<I>&
saturate<I>::operator*=(saturate x)
{
switch (i_)
{
case 0:
switch (x.i_)
{
case pos_inf:
case neg_inf:
case nan:
i_ = nan;
}
return *this;
case pos_inf:
switch (x.i_)
{
case nan:
case 0:
i_ = nan;
return *this;
}
if (x.i_ < 0)
i_ = neg_inf;
return *this;
case nan:
return *this;
case neg_inf:
switch (x.i_)
{
case nan:
case 0:
i_ = nan;
return *this;
}
if (x.i_ < 0)
i_ = pos_inf;
return *this;
}
switch (x.i_)
{
case 0:
i_ = 0;
return *this;
case nan:
i_ = nan;
return *this;
case pos_inf:
if (i_ < 0)
i_ = neg_inf;
else
i_ = pos_inf;
return *this;
case neg_inf:
if (i_ < 0)
i_ = pos_inf;
else
i_ = neg_inf;
return *this;
}
int s = (i_ < 0 ? -1 : 1) * (x.i_ < 0 ? -1 : 1);
i_ = i_ < 0 ? -i_ : i_;
int_type x_i_ = x.i_ < 0 ? -x.i_ : x.i_;
if (i_ <= pos_inf / x_i_)
i_ *= x_i_;
else
i_ = pos_inf;
i_ *= s;
return *this;
}
template <class I>
saturate<I>&
saturate<I>::operator/=(saturate x)
{
switch (x.i_)
{
case pos_inf:
case neg_inf:
switch (i_)
{
case pos_inf:
case neg_inf:
case nan:
i_ = nan;
break;
default:
i_ = 0;
break;
}
return *this;
case nan:
i_ = nan;
return *this;
case 0:
switch (i_)
{
case pos_inf:
case neg_inf:
case nan:
return *this;
case 0:
i_ = nan;
return *this;
}
if (i_ > 0)
i_ = pos_inf;
else
i_ = neg_inf;
return *this;
}
switch (i_)
{
case 0:
case nan:
return *this;
case pos_inf:
case neg_inf:
if (x.i_ < 0)
i_ = -i_;
return *this;
}
i_ /= x.i_;
return *this;
}
template <class I>
saturate<I>&
saturate<I>::operator%=(saturate x)
{
// *this -= *this / x * x; // definition
switch (x.i_)
{
case nan:
case neg_inf:
case 0:
case pos_inf:
i_ = nan;
return *this;
}
switch (i_)
{
case neg_inf:
case pos_inf:
i_ = nan;
case nan:
return *this;
}
i_ %= x.i_;
return *this;
}
// Demo overflow-safe integral durations ranging from picoseconds resolution to millennium resolution
typedef boost::chrono::duration<saturate<long long>, boost::pico > picoseconds;
typedef boost::chrono::duration<saturate<long long>, boost::nano > nanoseconds;
typedef boost::chrono::duration<saturate<long long>, boost::micro > microseconds;
typedef boost::chrono::duration<saturate<long long>, boost::milli > milliseconds;
typedef boost::chrono::duration<saturate<long long> > seconds;
typedef boost::chrono::duration<saturate<long long>, boost::ratio< 60LL> > minutes;
typedef boost::chrono::duration<saturate<long long>, boost::ratio< 3600LL> > hours;
typedef boost::chrono::duration<saturate<long long>, boost::ratio< 86400LL> > days;
typedef boost::chrono::duration<saturate<long long>, boost::ratio< 31556952LL> > years;
typedef boost::chrono::duration<saturate<long long>, boost::ratio<31556952000LL> > millennium;
} // User2
// Demonstrate custom promotion rules (needed only if there are no implicit conversions)
namespace User2 { namespace detail {
template <class T1, class T2, bool = boost::is_integral<T1>::value>
struct promote_helper;
template <class T1, class T2>
struct promote_helper<T1, saturate<T2>, true> // integral
{
typedef typename boost::common_type<T1, T2>::type rep;
typedef User2::saturate<rep> type;
};
template <class T1, class T2>
struct promote_helper<T1, saturate<T2>, false> // floating
{
typedef T1 type;
};
} }
namespace boost
{
template <class T1, class T2>
struct common_type<User2::saturate<T1>, User2::saturate<T2> >
{
typedef typename common_type<T1, T2>::type rep;
typedef User2::saturate<rep> type;
};
template <class T1, class T2>
struct common_type<T1, User2::saturate<T2> >
: User2::detail::promote_helper<T1, User2::saturate<T2> > {};
template <class T1, class T2>
struct common_type<User2::saturate<T1>, T2>
: User2::detail::promote_helper<T2, User2::saturate<T1> > {};
// Demonstrate specialization of duration_values:
namespace chrono {
template <class I>
struct duration_values<User2::saturate<I> >
{
typedef User2::saturate<I> Rep;
public:
static Rep zero() {return Rep(0);}
static Rep max BOOST_PREVENT_MACRO_SUBSTITUTION () {return Rep(Rep::pos_inf-1);}
static Rep min BOOST_PREVENT_MACRO_SUBSTITUTION () {return -(max)();}
};
} // namespace chrono
} // namespace boost
#include <iostream>
void testUser2()
{
std::cout << "*************\n";
std::cout << "* testUser2 *\n";
std::cout << "*************\n";
using namespace User2;
typedef seconds::rep sat;
years yr(sat(100));
std::cout << "100 years expressed as years = " << yr.count() << '\n';
nanoseconds ns = yr;
std::cout << "100 years expressed as nanoseconds = " << ns.count() << '\n';
ns += yr;
std::cout << "200 years expressed as nanoseconds = " << ns.count() << '\n';
ns += yr;
std::cout << "300 years expressed as nanoseconds = " << ns.count() << '\n';
// yr = ns; // does not compile
std::cout << "yr = ns; // does not compile\n";
// picoseconds ps1 = yr; // does not compile, compile-time overflow in ratio arithmetic
std::cout << "ps = yr; // does not compile\n";
ns = yr;
picoseconds ps = ns;
std::cout << "100 years expressed as picoseconds = " << ps.count() << '\n';
ps = ns / sat(1000);
std::cout << "0.1 years expressed as picoseconds = " << ps.count() << '\n';
yr = years(sat(-200000000));
std::cout << "200 million years ago encoded in years: " << yr.count() << '\n';
days d = boost::chrono::duration_cast<days>(yr);
std::cout << "200 million years ago encoded in days: " << d.count() << '\n';
millennium c = boost::chrono::duration_cast<millennium>(yr);
std::cout << "200 million years ago encoded in millennium: " << c.count() << '\n';
std::cout << "Demonstrate \"uninitialized protection\" behavior:\n";
seconds sec;
for (++sec; sec < seconds(sat(10)); ++sec)
;
std::cout << sec.count() << '\n';
std::cout << "\n";
}
void testStdUser()
{
std::cout << "***************\n";
std::cout << "* testStdUser *\n";
std::cout << "***************\n";
using namespace boost::chrono;
hours hr = hours(100);
std::cout << "100 hours expressed as hours = " << hr.count() << '\n';
nanoseconds ns = hr;
std::cout << "100 hours expressed as nanoseconds = " << ns.count() << '\n';
ns += hr;
std::cout << "200 hours expressed as nanoseconds = " << ns.count() << '\n';
ns += hr;
std::cout << "300 hours expressed as nanoseconds = " << ns.count() << '\n';
// hr = ns; // does not compile
std::cout << "hr = ns; // does not compile\n";
// hr * ns; // does not compile
std::cout << "hr * ns; // does not compile\n";
duration<double> fs(2.5);
std::cout << "duration<double> has count() = " << fs.count() << '\n';
// seconds sec = fs; // does not compile
std::cout << "seconds sec = duration<double> won't compile\n";
seconds sec = duration_cast<seconds>(fs);
std::cout << "seconds has count() = " << sec.count() << '\n';
std::cout << "\n";
}
int main()
{
testStdUser();
testUser2();
return 0;
}

View File

@@ -0,0 +1,198 @@
// simulated_thread_interface_demo.cpp ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#define _CRT_SECURE_NO_WARNINGS // disable VC++ foolishness
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
#include <ostream>
#include <stdexcept>
#include <climits>
//////////////////////////////////////////////////////////
///////////// simulated thread interface /////////////////
//////////////////////////////////////////////////////////
namespace {
void print_time(boost::chrono::system_clock::time_point t)
{
using namespace boost::chrono;
time_t c_time = system_clock::to_time_t(t);
std::tm* tmptr = std::localtime(&c_time);
system_clock::duration d = t.time_since_epoch();
std::cout << tmptr->tm_hour << ':' << tmptr->tm_min << ':' << tmptr->tm_sec
<< '.' << (d - duration_cast<seconds>(d)).count();
}
}
namespace boost {
namespace this_thread {
template <class Rep, class Period>
void sleep_for(const boost::chrono::duration<Rep, Period>& d)
{
boost::chrono::microseconds t = boost::chrono::duration_cast<boost::chrono::microseconds>(d);
if (t < d)
++t;
if (t > boost::chrono::microseconds(0))
std::cout << "sleep_for " << t.count() << " microseconds\n";
}
template <class Clock, class Duration>
void sleep_until(const boost::chrono::time_point<Clock, Duration>& t)
{
using namespace boost::chrono;
typedef time_point<Clock, Duration> Time;
typedef system_clock::time_point SysTime;
if (t > Clock::now())
{
typedef typename boost::common_type<typename Time::duration,
typename SysTime::duration>::type D;
/* auto */ D d = t - Clock::now();
microseconds us = duration_cast<microseconds>(d);
if (us < d)
++us;
SysTime st = system_clock::now() + us;
std::cout << "sleep_until ";
::print_time(st);
std::cout << " which is " << (st - system_clock::now()).count() << " microseconds away\n";
}
}
} // this_thread
struct mutex {};
struct timed_mutex
{
bool try_lock() {std::cout << "timed_mutex::try_lock()\n"; return true;}
template <class Rep, class Period>
bool try_lock_for(const boost::chrono::duration<Rep, Period>& d)
{
boost::chrono::microseconds t = boost::chrono::duration_cast<boost::chrono::microseconds>(d);
if (t <= boost::chrono::microseconds(0))
return try_lock();
std::cout << "try_lock_for " << t.count() << " microseconds\n";
return true;
}
template <class Clock, class Duration>
bool try_lock_until(const boost::chrono::time_point<Clock, Duration>& t)
{
using namespace boost::chrono;
typedef time_point<Clock, Duration> Time;
typedef system_clock::time_point SysTime;
if (t <= Clock::now())
return try_lock();
typedef typename boost::common_type<typename Time::duration,
typename Clock::duration>::type D;
/* auto */ D d = t - Clock::now();
microseconds us = duration_cast<microseconds>(d);
SysTime st = system_clock::now() + us;
std::cout << "try_lock_until ";
::print_time(st);
std::cout << " which is " << (st - system_clock::now()).count()
<< " microseconds away\n";
return true;
}
};
struct condition_variable
{
template <class Rep, class Period>
bool wait_for(mutex&, const boost::chrono::duration<Rep, Period>& d)
{
boost::chrono::microseconds t = boost::chrono::duration_cast<boost::chrono::microseconds>(d);
std::cout << "wait_for " << t.count() << " microseconds\n";
return true;
}
template <class Clock, class Duration>
bool wait_until(mutex&, const boost::chrono::time_point<Clock, Duration>& t)
{
using namespace boost::chrono;
typedef time_point<Clock, Duration> Time;
typedef system_clock::time_point SysTime;
if (t <= Clock::now())
return false;
typedef typename boost::common_type<typename Time::duration,
typename Clock::duration>::type D;
/* auto */ D d = t - Clock::now();
microseconds us = duration_cast<microseconds>(d);
SysTime st = system_clock::now() + us;
std::cout << "wait_until ";
::print_time(st);
std::cout << " which is " << (st - system_clock::now()).count()
<< " microseconds away\n";
return true;
}
};
}
//////////////////////////////////////////////////////////
//////////// Simple sleep and wait examples //////////////
//////////////////////////////////////////////////////////
boost::mutex m;
boost::timed_mutex mut;
boost::condition_variable cv;
void basic_examples()
{
std::cout << "Running basic examples\n";
using namespace boost;
using namespace boost::chrono;
system_clock::time_point time_limit = system_clock::now() + seconds(4) + milliseconds(500);
this_thread::sleep_for(seconds(3));
this_thread::sleep_for(nanoseconds(300));
this_thread::sleep_until(time_limit);
// this_thread::sleep_for(time_limit); // desired compile-time error
// this_thread::sleep_until(seconds(3)); // desired compile-time error
mut.try_lock_for(milliseconds(30));
mut.try_lock_until(time_limit);
// mut.try_lock_for(time_limit); // desired compile-time error
// mut.try_lock_until(milliseconds(30)); // desired compile-time error
cv.wait_for(m, minutes(1)); // real code would put this in a loop
cv.wait_until(m, time_limit); // real code would put this in a loop
// For those who prefer floating point
this_thread::sleep_for(duration<double>(0.25));
this_thread::sleep_until(system_clock::now() + duration<double>(1.5));
}
int main()
{
basic_examples();
return 0;
}

View File

@@ -0,0 +1,182 @@
// test_system_clock.cpp ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
#include "clock_name.hpp"
#if defined(BOOST_NO_CXX11_CONSTEXPR)
using namespace boost::chrono;
template <typename Clock>
void test_clock()
{
std::cout << "\n"<< name<Clock>::apply() << " test" << std::endl;
{
typename Clock::duration delay = milliseconds(5);
typename Clock::time_point start = Clock::now();
while (Clock::now() - start <= delay)
;
typename Clock::time_point stop = Clock::now();
//typename Clock::duration elapsed = stop - start;
std::cout << "5 milliseconds paused " << nanoseconds(stop - start).count() << " nanoseconds\n";
}
{
typename Clock::time_point start = Clock::now();
typename Clock::time_point stop;
std::size_t counter=1;
while ((stop=Clock::now()) == start) {
++counter;
}
//typename Clock::duration elapsed = stop - start;
std::cout << "After " << counter << " trials, elapsed time " << nanoseconds(stop - start).count() << " nanoseconds\n";
start = Clock::now();
for (std::size_t c=counter; c>0; --c) {
stop=Clock::now();;
}
std::cout << "After " << counter << " trials, elapsed time " << nanoseconds(stop - start).count() << " nanoseconds\n";
}
{
typename Clock::time_point start = Clock::now();
typename Clock::time_point stop = Clock::now();
std::cout << "Resolution estimate: " << nanoseconds(stop-start).count() << " nanoseconds\n";
}
}
void test_system_clock()
{
std::cout << "system_clock test" << std::endl;
system_clock::duration delay = milliseconds(5);
system_clock::time_point start = system_clock::now();
while (system_clock::now() - start <= delay)
;
system_clock::time_point stop = system_clock::now();
system_clock::duration elapsed = stop - start;
std::cout << "paused " << nanoseconds(elapsed).count() << " nanoseconds\n";
start = system_clock::now();
stop = system_clock::now();
std::cout << "system_clock resolution estimate: " << nanoseconds(stop-start).count() << " nanoseconds\n";
}
void test_steady_clock()
{
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
std::cout << "steady_clock test" << std::endl;
steady_clock::duration delay = milliseconds(5);
steady_clock::time_point start = steady_clock::now();
while (steady_clock::now() - start <= delay)
;
steady_clock::time_point stop = steady_clock::now();
steady_clock::duration elapsed = stop - start;
std::cout << "paused " << nanoseconds(elapsed).count() << " nanoseconds\n";
start = steady_clock::now();
stop = steady_clock::now();
std::cout << "steady_clock resolution estimate: " << nanoseconds(stop-start).count() << " nanoseconds\n";
#endif
}
void test_hi_resolution_clock()
{
std::cout << "high_resolution_clock test" << std::endl;
high_resolution_clock::duration delay = milliseconds(5);
high_resolution_clock::time_point start = high_resolution_clock::now();
while (high_resolution_clock::now() - start <= delay)
;
high_resolution_clock::time_point stop = high_resolution_clock::now();
high_resolution_clock::duration elapsed = stop - start;
std::cout << "paused " << nanoseconds(elapsed).count() << " nanoseconds\n";
start = high_resolution_clock::now();
stop = high_resolution_clock::now();
std::cout << "high_resolution_clock resolution estimate: " << nanoseconds(stop-start).count() << " nanoseconds\n";
}
//void test_mixed_clock()
//{
// std::cout << "mixed clock test" << std::endl;
// high_resolution_clock::time_point hstart = high_resolution_clock::now();
// std::cout << "Add 5 milliseconds to a high_resolution_clock::time_point\n";
// steady_clock::time_point mend = hstart + milliseconds(5);
// bool b = hstart == mend;
// system_clock::time_point sstart = system_clock::now();
// std::cout << "Subtracting system_clock::time_point from steady_clock::time_point doesn't compile\n";
//// mend - sstart; // doesn't compile
// std::cout << "subtract high_resolution_clock::time_point from steady_clock::time_point"
// " and add that to a system_clock::time_point\n";
// system_clock::time_point send = sstart + duration_cast<system_clock::duration>(mend - hstart);
// std::cout << "subtract two system_clock::time_point's and output that in microseconds:\n";
// microseconds ms = send - sstart;
// std::cout << ms.count() << " microseconds\n";
//}
//
//void test_c_mapping()
//{
// std::cout << "C map test\n";
// using namespace boost::chrono;
// system_clock::time_point t1 = system_clock::now();
// std::time_t c_time = system_clock::to_time_t(t1);
// std::tm* tmptr = std::localtime(&c_time);
// std::cout << "It is now " << tmptr->tm_hour << ':' << tmptr->tm_min << ':' << tmptr->tm_sec << ' '
// << tmptr->tm_year + 1900 << '-' << tmptr->tm_mon + 1 << '-' << tmptr->tm_mday << '\n';
// c_time = std::mktime(tmptr);
// system_clock::time_point t2 = system_clock::from_time_t(c_time);
// microseconds ms = t1 - t2;
// std::cout << "Round-tripping through the C interface truncated the precision by " << ms.count() << " microseconds\n";
//}
int main()
{
test_system_clock();
test_steady_clock();
test_hi_resolution_clock();
//test_mixed_clock();
test_clock<system_clock>();
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
test_clock<steady_clock>();
#endif
test_clock<high_resolution_clock>();
return 0;
}
#else
int main()
{
return 0;
}
#endif

View File

@@ -0,0 +1,210 @@
// test_system_clock.cpp ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
#include "clock_name.hpp"
namespace boost {
namespace detail_chrono {
class steady_clock {};
class system_clock {};
}
namespace chrono {
namespace chrono_detail {
using namespace detail_chrono;
struct has_steady_clock {
template< class T > static char sfinae( typename T::rep );
template< class > static int sfinae( ... );
enum { value = sizeof sfinae< steady_clock >( 0 ) == sizeof(char) };
};
struct has_system_clock {
template< class T > static char sfinae( typename T::rep );
template< class > static int sfinae( ... );
enum { value = sizeof sfinae< system_clock >( 0 ) == sizeof(char) };
};
}
struct has_steady_clock
: integral_constant<bool, chrono_detail::has_steady_clock::value> {};
struct has_system_clock
: integral_constant<bool, chrono_detail::has_system_clock::value> {};
}
}
BOOST_STATIC_ASSERT(boost::chrono::has_system_clock::value);
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
BOOST_STATIC_ASSERT(boost::chrono::has_steady_clock::value);
#else
BOOST_STATIC_ASSERT(!boost::chrono::has_steady_clock::value);
#endif
using namespace boost::chrono;
using namespace boost;
template <typename Clock>
void test_clock()
{
std::cout << "\n"<< name<Clock>::apply() << " test" << std::endl;
{
typename Clock::duration delay = milliseconds(5);
typename Clock::time_point start = Clock::now();
while (Clock::now() - start <= delay)
;
typename Clock::time_point stop = Clock::now();
//typename Clock::duration elapsed = stop - start;
std::cout << "5 milliseconds paused " << nanoseconds(stop - start).count() << " nanoseconds\n";
}
{
typename Clock::time_point start = Clock::now();
typename Clock::time_point stop;
std::size_t count=1;
while ((stop=Clock::now()) == start) {
++count;
}
//typename Clock::duration elapsed = stop - start;
std::cout << "After " << count << " trials, elapsed time " << nanoseconds(stop - start).count() << " nanoseconds\n";
start = Clock::now();
for (std::size_t c=count; c>0; --c) {
stop=Clock::now();;
}
std::cout << "After " << count << " trials, elapsed time " << nanoseconds(stop - start).count() << " nanoseconds\n";
}
{
typename Clock::time_point start = Clock::now();
typename Clock::time_point stop = Clock::now();
std::cout << "Resolution estimate: " << nanoseconds(stop-start).count() << " nanoseconds\n";
}
}
void test_system_clock()
{
std::cout << "system_clock test" << std::endl;
//~ system_clock clk;
chrono::system_clock::duration delay = milliseconds(5);
chrono::system_clock::time_point start = system_clock::now();
while (chrono::system_clock::now() - start <= delay)
;
chrono::system_clock::time_point stop = system_clock::now();
chrono::system_clock::duration elapsed = stop - start;
std::cout << "paused " << nanoseconds(elapsed).count() << " nanoseconds\n";
start = chrono::system_clock::now();
stop = chrono::system_clock::now();
std::cout << "system_clock resolution estimate: " << nanoseconds(stop-start).count() << " nanoseconds\n";
}
void test_steady_clock()
{
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
std::cout << "steady_clock test" << std::endl;
steady_clock::duration delay = milliseconds(5);
steady_clock::time_point start = steady_clock::now();
while (steady_clock::now() - start <= delay)
;
steady_clock::time_point stop = steady_clock::now();
steady_clock::duration elapsed = stop - start;
std::cout << "paused " << nanoseconds(elapsed).count() << " nanoseconds\n";
start = steady_clock::now();
stop = steady_clock::now();
std::cout << "steady_clock resolution estimate: " << nanoseconds(stop-start).count() << " nanoseconds\n";
#endif
}
void test_hi_resolution_clock()
{
std::cout << "high_resolution_clock test" << std::endl;
high_resolution_clock::duration delay = milliseconds(5);
high_resolution_clock::time_point start = high_resolution_clock::now();
while (high_resolution_clock::now() - start <= delay)
;
high_resolution_clock::time_point stop = high_resolution_clock::now();
high_resolution_clock::duration elapsed = stop - start;
std::cout << "paused " << nanoseconds(elapsed).count() << " nanoseconds\n";
start = high_resolution_clock::now();
stop = high_resolution_clock::now();
std::cout << "high_resolution_clock resolution estimate: " << nanoseconds(stop-start).count() << " nanoseconds\n";
}
//void test_mixed_clock()
//{
// std::cout << "mixed clock test" << std::endl;
// high_resolution_clock::time_point hstart = high_resolution_clock::now();
// std::cout << "Add 5 milliseconds to a high_resolution_clock::time_point\n";
// steady_clock::time_point mend = hstart + milliseconds(5);
// bool b = hstart == mend;
// system_clock::time_point sstart = system_clock::now();
// std::cout << "Subtracting system_clock::time_point from steady_clock::time_point doesn't compile\n";
//// mend - sstart; // doesn't compile
// std::cout << "subtract high_resolution_clock::time_point from steady_clock::time_point"
// " and add that to a system_clock::time_point\n";
// system_clock::time_point send = sstart + duration_cast<system_clock::duration>(mend - hstart);
// std::cout << "subtract two system_clock::time_point's and output that in microseconds:\n";
// microseconds ms = send - sstart;
// std::cout << ms.count() << " microseconds\n";
//}
//
//void test_c_mapping()
//{
// std::cout << "C map test\n";
// using namespace boost::chrono;
// system_clock::time_point t1 = system_clock::now();
// std::time_t c_time = system_clock::to_time_t(t1);
// std::tm* tmptr = std::localtime(&c_time);
// std::cout << "It is now " << tmptr->tm_hour << ':' << tmptr->tm_min << ':' << tmptr->tm_sec << ' '
// << tmptr->tm_year + 1900 << '-' << tmptr->tm_mon + 1 << '-' << tmptr->tm_mday << '\n';
// c_time = std::mktime(tmptr);
// system_clock::time_point t2 = system_clock::from_time_t(c_time);
// microseconds ms = t1 - t2;
// std::cout << "Round-tripping through the C interface truncated the precision by " << ms.count() << " microseconds\n";
//}
int main()
{
test_system_clock();
test_steady_clock();
test_hi_resolution_clock();
//test_mixed_clock();
test_clock<system_clock>();
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
test_clock<steady_clock>();
#endif
test_clock<high_resolution_clock>();
return 0;
}

View File

@@ -0,0 +1,203 @@
// test_duration.cpp ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#include <boost/assert.hpp>
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
template <class Rep, class Period>
void inspect_duration(boost::chrono::duration<Rep, Period> d, const std::string& name)
{
typedef boost::chrono::duration<Rep, Period> Duration;
std::cout << "********* " << name << " *********\n";
std::cout << "The period of " << name << " is " << (double)Period::num/Period::den << " seconds.\n";
std::cout << "The frequency of " << name << " is " << (double)Period::den/Period::num << " Hz.\n";
std::cout << "The representation is ";
if (boost::is_floating_point<Rep>::value)
{
std::cout << "floating point\n";
std::cout << "The precision is the most significant ";
std::cout << std::numeric_limits<Rep>::digits10 << " decimal digits.\n";
}
else if (boost::is_integral<Rep>::value)
{
std::cout << "integral\n";
d = Duration(Rep(1));
boost::chrono::duration<double> dsec = d;
std::cout << "The precision is " << dsec.count() << " seconds.\n";
}
else
{
std::cout << "a class type\n";
d = Duration(Rep(1));
boost::chrono::duration<double> dsec = d;
std::cout << "The precision is " << dsec.count() << " seconds.\n";
}
d = Duration((std::numeric_limits<Rep>::max)());
using namespace boost::chrono;
typedef duration<double, boost::ratio_multiply<boost::ratio<24*3652425,10000>, hours::period>::type> Years;
Years years = d;
std::cout << "The range is +/- " << years.count() << " years.\n";
std::cout << "sizeof(" << name << ") = " << sizeof(d) << '\n';
}
void inspect_all()
{
using namespace boost::chrono;
std::cout.precision(6);
inspect_duration(nanoseconds(), "nanoseconds");
inspect_duration(microseconds(), "microseconds");
inspect_duration(milliseconds(), "milliseconds");
inspect_duration(seconds(), "seconds");
inspect_duration(minutes(), "minutes");
inspect_duration(hours(), "hours");
inspect_duration(duration<double>(), "duration<double>");
}
using namespace boost::chrono;
void test_duration_division()
{
typedef boost::common_type<boost::chrono::hours::rep, boost::chrono::minutes::rep>::type h_min_rep;
h_min_rep r3 = hours(3) / minutes(5);
std::cout << r3 << '\n';
std::cout << hours(3) / minutes(5) << '\n';
std::cout << hours(3) / milliseconds(5) << '\n';
std::cout << milliseconds(5) / hours(3) << '\n';
std::cout << hours(1) / milliseconds(1) << '\n';
}
void test_duration_multiply()
{
hours h15= 5 * hours(3);
(void)h15;
hours h6= hours(3) *2;
(void)h6;
}
void f(duration<double> d, double res) // accept floating point seconds
{
// d.count() == 3.e-6 when passed microseconds(3)
BOOST_ASSERT(d.count()==res);
}
void g(nanoseconds d, boost::intmax_t res)
{
// d.count() == 3000 when passed microseconds(3)
std::cout << d.count() << " " <<res << std::endl;
BOOST_ASSERT(d.count()==res);
}
template <class Rep, class Period>
void tmpl(duration<Rep, Period> d, boost::intmax_t res)
{
// convert d to nanoseconds, rounding up if it is not an exact conversion
nanoseconds ns = duration_cast<nanoseconds>(d);
if (ns < d)
++ns;
// ns.count() == 333333334 when passed 1/3 of a floating point second
BOOST_ASSERT(ns.count()==res);
}
template <class Period>
void tmpl2(duration<long long, Period> d, boost::intmax_t res)
{
// convert d to nanoseconds, rounding up if it is not an exact conversion
nanoseconds ns = duration_cast<nanoseconds>(d);
if (ns < d)
++ns;
// ns.count() == 333333334 when passed 333333333333 picoseconds
BOOST_ASSERT(ns.count()==res);
}
int main()
{
minutes m1(3); // m1 stores 3
minutes m2(2); // m2 stores 2
minutes m3 = m1 + m2; // m3 stores 5
BOOST_ASSERT(m3.count()==5);
microseconds us1(3); // us1 stores 3
microseconds us2(2); // us2 stores 2
microseconds us3 = us1 + us2; // us3 stores 5
BOOST_ASSERT(us3.count()==5);
microseconds us4 = m3 + us3; // us4 stores 300000005
BOOST_ASSERT(us4.count()==300000005);
microseconds us5 = m3; // us4 stores 300000000
BOOST_ASSERT(us5.count()==300000000);
//minutes m4 = m3 + us3; // won't compile
minutes m4 = duration_cast<minutes>(m3 + us3); // m4.count() == 5
BOOST_ASSERT(m4.count()==5);
typedef duration<double, boost::ratio<60> > dminutes;
dminutes dm4 = m3 + us3; // dm4.count() == 5.000000083333333
BOOST_ASSERT(dm4.count()==5.000000083333333);
f(microseconds(3), 0.000003);
g(microseconds(3), 3000);
duration<double> s(1./3); // 1/3 of a second
g(duration_cast<nanoseconds>(s), 333333333); // round towards zero in conversion to nanoseconds
//f(s); // does not compile
tmpl(duration<double>(1./3), 333333334);
tmpl2(duration<long long, boost::pico>(333333333333LL), 333333334); // About 1/3 of a second worth of picoseconds
//f(3,3); // Will not compile, 3 is not implicitly convertible to any `duration`
//g(3,3); // Will not compile, 3 is not implicitly convertible to any `duration`
//tmpl(3,3); // Will not compile, 3 is not implicitly convertible to any `duration`
//tmpl2(3,3); // Will not compile, 3 is not implicitly convertible to any `duration`
{
double r = double(milliseconds(3) / milliseconds(3));
std::cout << r << '\n';
duration<double, boost::milli> d = milliseconds(3) * 2.5;
duration<double, boost::milli> d2 = 2.5 * milliseconds(3) ;
(void)d2;
duration<double, boost::milli> d3 = milliseconds(3) / 2.5;
(void)d3;
duration<double, boost::milli> d4 = milliseconds(3) + milliseconds(5) ;
(void)d4;
inspect_duration(milliseconds(3) * 2.5, "milliseconds(3) * 2.5");
std::cout << d.count() << '\n';
// milliseconds ms(3.5); // doesn't compile
std::cout << "milliseconds ms(3.5) doesn't compile\n";
}
test_duration_division();
test_duration_multiply();
return 0;
}

View File

@@ -0,0 +1,17 @@
// test_duration.cpp ----------------------------------------------------------//
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#if !defined(__GNUC__)
#define min(A,B) ((A)<(B)?(A):(B))
#define max(A,B) ((A)>(B)?(A):(B))
#include <boost/chrono/chrono.hpp>
#endif

View File

@@ -0,0 +1,51 @@
// test_special_values.cpp ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
using namespace boost::chrono;
void test_special_values()
{
std::cout << "duration<unsigned>::min().count() = " << ((duration<unsigned>::min)()).count() << '\n';
std::cout << "duration<unsigned>::zero().count() = " << duration<unsigned>::zero().count() << '\n';
std::cout << "duration<unsigned>::max().count() = " << ((duration<unsigned>::max)()).count() << '\n';
std::cout << "duration<int>::min().count() = " << ((duration<int>::min)()).count() << '\n';
std::cout << "duration<int>::zero().count() = " << duration<int>::zero().count() << '\n';
std::cout << "duration<int>::max().count() = " << ((duration<int>::max)()).count() << '\n';
}
int main()
{
test_special_values();
return 0;
}

View File

@@ -0,0 +1,42 @@
// test_thread_clock.cpp ----------------------------------------------------------//
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#include <boost/chrono/thread_clock.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
void test_thread_clock()
{
#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
using namespace boost::chrono;
std::cout << "thread_clock test" << std::endl;
thread_clock::duration delay = milliseconds(5);
thread_clock::time_point start = thread_clock::now();
while (thread_clock::now() - start <= delay)
;
thread_clock::time_point stop = thread_clock::now();
thread_clock::duration elapsed = stop - start;
std::cout << "paused " << nanoseconds(elapsed).count() << " nanoseconds\n";
start = thread_clock::now();
stop = thread_clock::now();
std::cout << "thread_clock resolution estimate: " << nanoseconds(stop-start).count() << " nanoseconds\n";
#else
std::cout << "thread_clock not available\n";
#endif
}
int main()
{
test_thread_clock();
return 0;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,191 @@
// time2_demo.output ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
Running basic examples
sleep_for 3000000 microseconds
sleep_for 1 microseconds
sleep_until 10:47:17.728293 which is 4499340 microseconds away
try_lock_for 30000 microseconds
try_lock_until 10:47:17.728285 which is 4499303 microseconds away
wait_for 60000000 microseconds
wait_until 10:47:17.728285 which is 4499264 microseconds away
sleep_for 250000 microseconds
sleep_until 10:47:14.729077 which is 1499979 microseconds away
***************
* testStdUser *
***************
100 hours expressed as hours = 100
100 hours expressed as nanoseconds = 360000000000000
200 hours expressed as nanoseconds = 720000000000000
300 hours expressed as nanoseconds = 1080000000000000
hr = ns; // does not compile
hr * ns; // does not compile
duration<double> has count() = 2.5
seconds sec = duration<double> won't compile
seconds has count() = 2
*************
* testUser1 *
*************
Speed = 24.5872 meters/sec
Acceleration = 9.81456 meters/sec^2
Distance = 13.5204 meters
There are 125/201168 miles/meter which is approximately 0.000621371
There are 201168/125 meters/mile which is approximately 1609.34
1 attosecond is 1e-18 seconds
sec = as; // compiles
1 second is 1e+18 attoseconds
as = sec; // compiles
*************
* testUser2 *
*************
100 years expressed as years = 100
100 years expressed as nanoseconds = 3155695200000000000
200 years expressed as nanoseconds = 6311390400000000000
300 years expressed as nanoseconds = inf
yr = ns; // does not compile
ps = yr; // does not compile
100 years expressed as picoseconds = inf
0.1 years expressed as picoseconds = 3155695200000000000
200 million years ago encoded in years: -200000000
200 million years ago encoded in days: -73048500000
200 million years ago encoded in millennium: -200000
Demonstrate "uninitialized protection" behavior:
nan
d = 3e-09
d = 10800
d = 0.666667
d = 10799.999999997
292 years of hours = 2559672hr
Add a nanosecond = 9214819200000000001ns
Find the difference = 1ns
244,000 years of hours = 2138904000hr
Add a microsecond = 7700054400000000001us
Find the difference = 1us
********* nanoseconds *********
The period of nanoseconds is 1e-09 seconds.
The frequency of nanoseconds is 1e+09 Hz.
The representation is integral
The precision is 1e-09 seconds.
The range is +/- 292.277 years.
sizeof(nanoseconds) = 8
********* microseconds *********
The period of microseconds is 1e-06 seconds.
The frequency of microseconds is 1e+06 Hz.
The representation is integral
The precision is 1e-06 seconds.
The range is +/- 292277 years.
sizeof(microseconds) = 8
********* milliseconds *********
The period of milliseconds is 0.001 seconds.
The frequency of milliseconds is 1000 Hz.
The representation is integral
The precision is 0.001 seconds.
The range is +/- 2.92277e+08 years.
sizeof(milliseconds) = 8
********* seconds *********
The period of seconds is 1 seconds.
The frequency of seconds is 1 Hz.
The representation is integral
The precision is 1 seconds.
The range is +/- 2.92277e+11 years.
sizeof(seconds) = 8
********* minutes *********
The period of minutes is 60 seconds.
The frequency of minutes is 0.0166667 Hz.
The representation is integral
The precision is 60 seconds.
The range is +/- 4083.06 years.
sizeof(minutes) = 4
********* hours *********
The period of hours is 3600 seconds.
The frequency of hours is 0.000277778 Hz.
The representation is integral
The precision is 3600 seconds.
The range is +/- 244984 years.
sizeof(hours) = 4
********* duration<double> *********
The period of duration<double> is 1 seconds.
The frequency of duration<double> is 1 Hz.
The representation is floating point
The precision is the most significant 15 decimal digits.
The range is +/- 5.69666e+300 years.
sizeof(duration<double>) = 8
success
test_with_xtime
{3,251000}
3251 milliseconds
{3,251000}
{3,0}
{3,1}
system_clock test
paused 5001000 nanoseconds
system_clock resolution estimate: 0 nanoseconds
monotonic_clock test
paused 5000181 nanoseconds
monotonic_clock resolution estimate: 97 nanoseconds
high_resolution_clock test
paused 5000277 nanoseconds
high_resolution_clock resolution estimate: 96 nanoseconds
mixed clock test
Add 5 milliseconds to a high_resolution_clock::time_point
Subtracting system_clock::time_point from monotonic_clock::time_point doesn't compile
subtract high_resolution_clock::time_point from monotonic_clock::time_point and add that to a system_clock::time_point
subtract two system_clock::time_point's and output that in microseconds:
5000 microseconds
timeval_demo system clock test
sizeof xtime_clock::time_point = 8
sizeof xtime_clock::duration = 8
sizeof xtime_clock::rep = 8
paused 5001000 nanoseconds
runtime_resolution test
paused 5000205 nanoseconds
C map test
It is now 10:47:13 2008-4-22
Round-tripping through the C interface truncated the precision by 255445 microseconds
2160000
0
3600000
0
2999998997 * 1/1000000000 seconds
0 * 1/1000000000 seconds
15778476000000000 microseconds
paused 5001000 nanoseconds
********* milliseconds(3) * 2.5 *********
The period of milliseconds(3) * 2.5 is 0.001 seconds.
The frequency of milliseconds(3) * 2.5 is 1000 Hz.
The representation is floating point
The precision is the most significant 15 decimal digits.
The range is +/- 5.69666e+297 years.
sizeof(milliseconds(3) * 2.5) = 8
7.5
milliseconds ms(3.5) doesn't compile
Simulated 400MHz clock which has a tick period of 2.5 nanoseconds
delay = 500 nanoseconds which is 200 cycles
paused 201 cycles which is 502 nanoseconds
Simulated 400MHz clock modeled with nanoseconds
delay = 500 nanoseconds
paused 503 nanoseconds
Simulated 1500MHz clock which has a tick period of 0.666667 nanoseconds
delay = 500 nanoseconds which is 750 cycles
paused 751 cycles which is 500 nanoseconds
Simulated 1500MHz clock modeled with nanoseconds
delay = 500 nanoseconds
paused 500 nanoseconds
duration<unsigned>::min().count() = 0
duration<unsigned>::zero().count() = 0
duration<unsigned>::max().count() = 4294967295
duration<int>::min().count() = -2147483647
duration<int>::zero().count() = 0
duration<int>::max().count() = 2147483647

View File

@@ -0,0 +1,62 @@
// boost/chrono/timer.hpp ------------------------------------------------------------//
// Copyright Beman Dawes 2008
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/system for documentation.
#ifndef BOOSTEX_CHRONO_TIMER_HPP
#define BOOSTEX_CHRONO_TIMER_HPP
#include <boost/chrono/chrono.hpp>
#include <boost/system/error_code.hpp>
namespace boost_ex
{
namespace chrono
{
//--------------------------------------------------------------------------------------//
// timer //
//--------------------------------------------------------------------------------------//
template <class Clock=boost::chrono::high_resolution_clock>
class timer
{
public:
typedef Clock clock;
typedef typename Clock::duration duration;
typedef typename Clock::time_point time_point;
explicit timer( boost::system::error_code & ec = ::boost::throws() )
{
start(ec);
}
~timer() {} // never throws
void start( boost::system::error_code & ec = ::boost::throws() )
{
m_start = clock::now( ec );
}
duration elapsed( boost::system::error_code & ec = ::boost::throws() )
{ return clock::now( ec ) - m_start; }
private:
time_point m_start;
};
typedef chrono::timer< boost::chrono::system_clock > system_timer;
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
typedef chrono::timer< boost::chrono::steady_clock > steady_timer;
#endif
typedef chrono::timer< boost::chrono::high_resolution_clock > high_resolution_timer;
} // namespace chrono
} // namespace boost_ex
#endif

View File

@@ -0,0 +1,237 @@
// timeval_demo.cpp ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009 Vicente J. Botet Escriba
// Copyright (c) Microsoft Corporation 2014
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#define _CRT_SECURE_NO_WARNINGS // disable VC++ foolishness
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
#if defined(BOOST_CHRONO_MAC_API)
#include <sys/time.h> //for gettimeofday and timeval
#endif
#if defined(BOOST_CHRONO_WINDOWS_API)
# include <windows.h>
#endif
#if defined(BOOST_CHRONO_WINDOWS_API)
namespace
{
#if defined UNDER_CE || BOOST_PLAT_WINDOWS_RUNTIME
// Windows CE and Windows store does not define timeval
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* and microseconds */
};
#endif
int gettimeofday(struct timeval * tp, void *)
{
FILETIME ft;
#if defined(UNDER_CE)
// Windows CE does not define GetSystemTimeAsFileTime so we do it in two steps.
SYSTEMTIME st;
::GetSystemTime( &st );
::SystemTimeToFileTime( &st, &ft );
#else
::GetSystemTimeAsFileTime( &ft ); // never fails
#endif
long long t = (static_cast<long long>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
# if !defined( BOOST_MSVC ) || BOOST_MSVC > 1300 // > VC++ 7.0
t -= 116444736000000000LL;
# else
t -= 116444736000000000;
# endif
t /= 10; // microseconds
tp->tv_sec = static_cast<long>( t / 1000000UL);
tp->tv_usec = static_cast<long>( t % 1000000UL);
return 0;
}
} // unnamed namespace
#endif
// timeval clock demo
// Demonstrate the use of a timeval-like struct to be used as the representation
// type for both duraiton and time_point.
namespace timeval_demo
{
class xtime {
private:
long tv_sec;
long tv_usec;
void fixup() {
if (tv_usec < 0) {
tv_usec += 1000000;
--tv_sec;
}
}
public:
explicit xtime(long sec, long usec) {
tv_sec = sec;
tv_usec = usec;
if (tv_usec < 0 || tv_usec >= 1000000) {
tv_sec += tv_usec / 1000000;
tv_usec %= 1000000;
fixup();
}
}
explicit xtime(long long usec)
{
tv_usec = static_cast<long>(usec % 1000000);
tv_sec = static_cast<long>(usec / 1000000);
fixup();
}
// explicit
operator long long() const {return static_cast<long long>(tv_sec) * 1000000 + tv_usec;}
xtime& operator += (xtime rhs) {
tv_sec += rhs.tv_sec;
tv_usec += rhs.tv_usec;
if (tv_usec >= 1000000) {
tv_usec -= 1000000;
++tv_sec;
}
return *this;
}
xtime& operator -= (xtime rhs) {
tv_sec -= rhs.tv_sec;
tv_usec -= rhs.tv_usec;
fixup();
return *this;
}
xtime& operator %= (xtime rhs) {
long long t = tv_sec * 1000000 + tv_usec;
long long r = rhs.tv_sec * 1000000 + rhs.tv_usec;
t %= r;
tv_sec = static_cast<long>(t / 1000000);
tv_usec = static_cast<long>(t % 1000000);
fixup();
return *this;
}
friend xtime operator+(xtime x, xtime y) {return x += y;}
friend xtime operator-(xtime x, xtime y) {return x -= y;}
friend xtime operator%(xtime x, xtime y) {return x %= y;}
friend bool operator==(xtime x, xtime y)
{ return (x.tv_sec == y.tv_sec && x.tv_usec == y.tv_usec); }
friend bool operator<(xtime x, xtime y) {
if (x.tv_sec == y.tv_sec)
return (x.tv_usec < y.tv_usec);
return (x.tv_sec < y.tv_sec);
}
friend bool operator!=(xtime x, xtime y) { return !(x == y); }
friend bool operator> (xtime x, xtime y) { return y < x; }
friend bool operator<=(xtime x, xtime y) { return !(y < x); }
friend bool operator>=(xtime x, xtime y) { return !(x < y); }
friend std::ostream& operator<<(std::ostream& os, xtime x)
{return os << '{' << x.tv_sec << ',' << x.tv_usec << '}';}
};
class xtime_clock
{
public:
typedef xtime rep;
typedef boost::micro period;
typedef boost::chrono::duration<rep, period> duration;
typedef boost::chrono::time_point<xtime_clock> time_point;
static time_point now();
};
xtime_clock::time_point
xtime_clock::now()
{
#if defined(BOOST_CHRONO_WINDOWS_API)
timeval tv;
gettimeofday(&tv, 0);
xtime xt( tv.tv_sec, tv.tv_usec);
return time_point(duration(xt));
#elif defined(BOOST_CHRONO_MAC_API)
timeval tv;
gettimeofday(&tv, 0);
xtime xt( tv.tv_sec, tv.tv_usec);
return time_point(duration(xt));
#elif defined(BOOST_CHRONO_POSIX_API)
//time_point t(0,0);
timespec ts;
::clock_gettime( CLOCK_REALTIME, &ts );
xtime xt( ts.tv_sec, ts.tv_nsec/1000);
return time_point(duration(xt));
#endif // POSIX
}
void test_xtime_clock()
{
using namespace boost::chrono;
std::cout << "timeval_demo system clock test\n";
std::cout << "sizeof xtime_clock::time_point = " << sizeof(xtime_clock::time_point) << '\n';
std::cout << "sizeof xtime_clock::duration = " << sizeof(xtime_clock::duration) << '\n';
std::cout << "sizeof xtime_clock::rep = " << sizeof(xtime_clock::rep) << '\n';
xtime_clock::duration delay(milliseconds(5));
xtime_clock::time_point start = xtime_clock::now();
while (xtime_clock::now() - start <= delay)
{
}
xtime_clock::time_point stop = xtime_clock::now();
xtime_clock::duration elapsed = stop - start;
std::cout << "paused " << nanoseconds(elapsed).count() << " nanoseconds\n";
}
} // timeval_demo
int main()
{
timeval_demo::test_xtime_clock();
return 0;
}

View File

@@ -0,0 +1,109 @@
// xtime.cpp ----------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <iostream>
using namespace boost::chrono;
// Example round_up utility: converts d to To, rounding up for inexact conversions
// Being able to *easily* write this function is a major feature!
template <class To, class Rep, class Period>
To
round_up(duration<Rep, Period> d)
{
To result = duration_cast<To>(d);
if (result < d)
++result;
return result;
}
// demonstrate interaction with xtime-like facility:
// msvc defines ::xtime in <mutex>, so we use xtime_
struct xtime_
{
long sec;
unsigned long usec;
};
template <class Rep, class Period>
xtime_
to_xtime_truncate(duration<Rep, Period> d)
{
xtime_ xt;
xt.sec = static_cast<long>(duration_cast<seconds>(d).count());
xt.usec = static_cast<long>(duration_cast<microseconds>(d - seconds(xt.sec)).count());
return xt;
}
template <class Rep, class Period>
xtime_
to_xtime_round_up(duration<Rep, Period> d)
{
xtime_ xt;
xt.sec = static_cast<long>(duration_cast<seconds>(d).count());
xt.usec = static_cast<unsigned long>(round_up<microseconds>(d - seconds(xt.sec)).count());
return xt;
}
microseconds
from_xtime(xtime_ xt)
{
return seconds(xt.sec) + microseconds(xt.usec);
}
void print(xtime_ xt)
{
std::cout << '{' << xt.sec << ',' << xt.usec << "}\n";
}
void test_with_xtime()
{
std::cout << "test_with_xtime\n";
xtime_ xt = to_xtime_truncate(seconds(3) + milliseconds(251));
print(xt);
milliseconds ms = duration_cast<milliseconds>(from_xtime(xt));
std::cout << ms.count() << " milliseconds\n";
xt = to_xtime_round_up(ms);
print(xt);
xt = to_xtime_truncate(seconds(3) + nanoseconds(999));
print(xt);
xt = to_xtime_round_up(seconds(3) + nanoseconds(999));
print(xt);
}
int main()
{
test_with_xtime();
return 0;
}

View File

@@ -0,0 +1,20 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Vicente J. Botet Escriba 2010.
// Distributed under the Boost
// Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or
// copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/stm for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_CHRONO_HPP
#define BOOST_CHRONO_HPP
//-----------------------------------------------------------------------------
#include <boost/chrono/include.hpp>
//-----------------------------------------------------------------------------
#endif // BOOST_CHRONO_HPP

View File

@@ -0,0 +1,36 @@
// boost/chrono/round.hpp ------------------------------------------------------------//
// (C) Copyright Howard Hinnant
// Copyright 2011 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/chrono for documentation.
#ifndef BOOST_CHRONO_CEIL_HPP
#define BOOST_CHRONO_CEIL_HPP
#include <boost/chrono/duration.hpp>
namespace boost
{
namespace chrono
{
/**
* rounds up
*/
template <class To, class Rep, class Period>
To ceil(const duration<Rep, Period>& d)
{
To t = duration_cast<To>(d);
if (t < d)
++t;
return t;
}
} // namespace chrono
} // namespace boost
#endif

View File

@@ -0,0 +1,15 @@
// chrono.hpp --------------------------------------------------------------//
// Copyright 2009-2011 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_CHRONO_CHRONO_HPP
#define BOOST_CHRONO_CHRONO_HPP
#include <boost/chrono/duration.hpp>
#include <boost/chrono/time_point.hpp>
#include <boost/chrono/system_clocks.hpp>
#endif // BOOST_CHRONO_CHRONO_HPP

View File

@@ -0,0 +1,34 @@
// chrono_io
//
// (C) Copyright Howard Hinnant
// (C) Copyright 2010-2011 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
// This code was adapted by Vicente from Howard Hinnant's experimental work
// on chrono i/o under lvm/libc++ to Boost
#ifndef BOOST_CHRONO_CHRONO_IO_HPP
#define BOOST_CHRONO_CHRONO_IO_HPP
#include <boost/chrono/config.hpp>
//#if BOOST_CHRONO_VERSION == 2
//#include <boost/chrono/io/time_point_io.hpp>
//#include <boost/chrono/io/duration_io.hpp>
//#elif BOOST_CHRONO_VERSION == 1
//#include <boost/chrono/io_v1/chrono_io.hpp>
//#endif
#if defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
#include <boost/chrono/io/time_point_io.hpp>
#include <boost/chrono/io/duration_io.hpp>
#else
#include <boost/chrono/io_v1/chrono_io.hpp>
#endif
#include <boost/chrono/io/utility/to_string.hpp>
#endif // BOOST_CHRONO_CHRONO_IO_HPP

View File

@@ -0,0 +1,25 @@
//
// (C) Copyright 2010-2011 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
#ifndef BOOST_CHRONO_CLOCK_STRING_HPP
#define BOOST_CHRONO_CLOCK_STRING_HPP
#include <string>
namespace boost
{
namespace chrono
{
template<class Clock, class CharT>
struct clock_string;
} // chrono
} // boost
#endif // BOOST_CHRONO_CLOCK_STRING_HPP

View File

@@ -0,0 +1,216 @@
// boost/chrono/config.hpp -------------------------------------------------//
// Copyright Beman Dawes 2003, 2006, 2008
// Copyright 2009-2011 Vicente J. Botet Escriba
// Copyright (c) Microsoft Corporation 2014
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/chrono for documentation.
#ifndef BOOST_CHRONO_CONFIG_HPP
#define BOOST_CHRONO_CONFIG_HPP
#include <boost/config.hpp>
#include <boost/predef.h>
#if !defined BOOST_CHRONO_VERSION
#define BOOST_CHRONO_VERSION 1
#else
#if BOOST_CHRONO_VERSION!=1 && BOOST_CHRONO_VERSION!=2
#error "BOOST_CHRONO_VERSION must be 1 or 2"
#endif
#endif
#if defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_USE_WINDOWS_H)
#define BOOST_USE_WINDOWS_H
#endif
#if ! defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT \
&& ! defined BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
# define BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
#endif
// BOOST_CHRONO_POSIX_API, BOOST_CHRONO_MAC_API, or BOOST_CHRONO_WINDOWS_API
// can be defined by the user to specify which API should be used
#if defined(BOOST_CHRONO_WINDOWS_API)
# warning Boost.Chrono will use the Windows API
#elif defined(BOOST_CHRONO_MAC_API)
# warning Boost.Chrono will use the Mac API
#elif defined(BOOST_CHRONO_POSIX_API)
# warning Boost.Chrono will use the POSIX API
#endif
# if defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_POSIX_API )
# error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_POSIX_API are defined
# elif defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_MAC_API )
# error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_MAC_API are defined
# elif defined( BOOST_CHRONO_MAC_API ) && defined( BOOST_CHRONO_POSIX_API )
# error both BOOST_CHRONO_MAC_API and BOOST_CHRONO_POSIX_API are defined
# elif !defined( BOOST_CHRONO_WINDOWS_API ) && !defined( BOOST_CHRONO_MAC_API ) && !defined( BOOST_CHRONO_POSIX_API )
# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32))
# define BOOST_CHRONO_WINDOWS_API
# elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
# define BOOST_CHRONO_MAC_API
# else
# define BOOST_CHRONO_POSIX_API
# endif
# endif
# if defined( BOOST_CHRONO_WINDOWS_API )
# ifndef UNDER_CE
# define BOOST_CHRONO_HAS_PROCESS_CLOCKS
# endif
# define BOOST_CHRONO_HAS_CLOCK_STEADY
# if BOOST_PLAT_WINDOWS_DESKTOP
# define BOOST_CHRONO_HAS_THREAD_CLOCK
# endif
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
# endif
# if defined( BOOST_CHRONO_MAC_API )
# define BOOST_CHRONO_HAS_PROCESS_CLOCKS
# define BOOST_CHRONO_HAS_CLOCK_STEADY
# define BOOST_CHRONO_HAS_THREAD_CLOCK
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
# endif
# if defined( BOOST_CHRONO_POSIX_API )
# define BOOST_CHRONO_HAS_PROCESS_CLOCKS
# include <time.h> //to check for CLOCK_REALTIME and CLOCK_MONOTONIC and _POSIX_THREAD_CPUTIME
# if defined(CLOCK_MONOTONIC)
# define BOOST_CHRONO_HAS_CLOCK_STEADY
# endif
# if defined(_POSIX_THREAD_CPUTIME) && !defined(BOOST_DISABLE_THREADS)
# define BOOST_CHRONO_HAS_THREAD_CLOCK
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
# endif
# if defined(CLOCK_THREAD_CPUTIME_ID) && !defined(BOOST_DISABLE_THREADS)
# define BOOST_CHRONO_HAS_THREAD_CLOCK
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
# endif
# if defined(sun) || defined(__sun)
# undef BOOST_CHRONO_HAS_THREAD_CLOCK
# undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
# endif
# if (defined(__HP_aCC) || defined(__GNUC__)) && defined(__hpux)
# undef BOOST_CHRONO_HAS_THREAD_CLOCK
# undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
# endif
# if defined(__VXWORKS__)
# undef BOOST_CHRONO_HAS_PROCESS_CLOCKS
# endif
# endif
#if defined(BOOST_CHRONO_THREAD_DISABLED) && defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
#undef BOOST_CHRONO_HAS_THREAD_CLOCK
#undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
#endif
// unicode support ------------------------------//
#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) || defined(BOOST_NO_CXX11_CHAR16_T) || defined(BOOST_NO_CXX11_CHAR32_T)
//~ #define BOOST_CHRONO_HAS_UNICODE_SUPPORT
#else
#define BOOST_CHRONO_HAS_UNICODE_SUPPORT 1
#endif
#ifndef BOOST_CHRONO_LIB_CONSTEXPR
#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS )
#define BOOST_CHRONO_LIB_CONSTEXPR
#elif defined(_LIBCPP_VERSION) && !defined(_LIBCPP_CONSTEXPR)
#define BOOST_CHRONO_LIB_CONSTEXPR
#else
#define BOOST_CHRONO_LIB_CONSTEXPR BOOST_CONSTEXPR
#endif
#endif
#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS )
# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw()
#else
#ifdef BOOST_NO_CXX11_NOEXCEPT
# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw()
#else
# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW noexcept
#endif
#endif
#if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \
&& defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
#error "BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING && BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING defined"
#endif
#if defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \
&& defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
#error "BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 && BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 defined"
#endif
#if ! defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \
&& ! defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
#define BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING
#endif
#if (BOOST_CHRONO_VERSION == 2)
#if ! defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \
&& ! defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
#define BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
#endif
#endif
#ifdef BOOST_CHRONO_HEADER_ONLY
#define BOOST_CHRONO_INLINE inline
#define BOOST_CHRONO_STATIC inline
#define BOOST_CHRONO_DECL
#else
#define BOOST_CHRONO_INLINE
#define BOOST_CHRONO_STATIC static
// enable dynamic linking on Windows ---------------------------------------//
// we need to import/export our code only if the user has specifically
// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
// libraries to be dynamically linked, or BOOST_CHRONO_DYN_LINK
// if they want just this one to be dynamically liked:
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK)
// export if this is our own source, otherwise import:
#ifdef BOOST_CHRONO_SOURCE
# define BOOST_CHRONO_DECL BOOST_SYMBOL_EXPORT
#else
# define BOOST_CHRONO_DECL BOOST_SYMBOL_IMPORT
#endif // BOOST_CHRONO_SOURCE
#endif // DYN_LINK
//
// if BOOST_CHRONO_DECL isn't defined yet define it now:
#ifndef BOOST_CHRONO_DECL
#define BOOST_CHRONO_DECL
#endif
// enable automatic library variant selection ------------------------------//
#if !defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_CHRONO_NO_LIB)
//
// Set the name of our library; this will get undef'ed by auto_link.hpp
// once it's done with it:
//
#define BOOST_LIB_NAME boost_chrono
//
// If we're importing code from a dll, then tell auto_link.hpp about it:
//
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK)
# define BOOST_DYN_LINK
#endif
//
// And include the header that does the work:
//
#include <boost/config/auto_link.hpp>
#endif // auto-linking disabled
#endif // BOOST_CHRONO_HEADER_ONLY
#endif // BOOST_CHRONO_CONFIG_HPP

View File

@@ -0,0 +1,46 @@
// chrono.cpp --------------------------------------------------------------//
// Copyright Beman Dawes 2008
// Copyright Vicente J. Botet Escriba 2009
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_CHRONO_DETAIL_INLINED_CHRONO_HPP
#define BOOST_CHRONO_DETAIL_INLINED_CHRONO_HPP
#include <boost/version.hpp>
#include <boost/chrono/chrono.hpp>
#if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING
#include <boost/system/system_error.hpp>
#endif
#include <boost/throw_exception.hpp>
#include <boost/chrono/detail/system.hpp>
//----------------------------------------------------------------------------//
// //
// Platform-specific Implementations //
// //
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// Windows //
//----------------------------------------------------------------------------//
#if defined(BOOST_CHRONO_WINDOWS_API)
#include <boost/chrono/detail/inlined/win/chrono.hpp>
//----------------------------------------------------------------------------//
// Mac //
//----------------------------------------------------------------------------//
#elif defined(BOOST_CHRONO_MAC_API)
#include <boost/chrono/detail/inlined/mac/chrono.hpp>
//----------------------------------------------------------------------------//
// POSIX //
//----------------------------------------------------------------------------//
#elif defined(BOOST_CHRONO_POSIX_API)
#include <boost/chrono/detail/inlined/posix/chrono.hpp>
#endif // POSIX
#endif

View File

@@ -0,0 +1,242 @@
// mac/chrono.cpp --------------------------------------------------------------//
// Copyright Beman Dawes 2008
// Copyright 2009-2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
//----------------------------------------------------------------------------//
// Mac //
//----------------------------------------------------------------------------//
#include <sys/time.h> //for gettimeofday and timeval
#include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t
#include <boost/assert.hpp>
namespace boost
{
namespace chrono
{
// system_clock
// gettimeofday is the most precise "system time" available on this platform.
// It returns the number of microseconds since New Years 1970 in a struct called timeval
// which has a field for seconds and a field for microseconds.
// Fill in the timeval and then convert that to the time_point
system_clock::time_point
system_clock::now() BOOST_NOEXCEPT
{
timeval tv;
gettimeofday(&tv, 0);
return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
system_clock::time_point
system_clock::now(system::error_code & ec)
{
timeval tv;
gettimeofday(&tv, 0);
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
}
#endif
// Take advantage of the fact that on this platform time_t is nothing but
// an integral count of seconds since New Years 1970 (same epoch as timeval).
// Just get the duration out of the time_point and truncate it to seconds.
time_t
system_clock::to_time_t(const time_point& t) BOOST_NOEXCEPT
{
return time_t(duration_cast<seconds>(t.time_since_epoch()).count());
}
// Just turn the time_t into a count of seconds and construct a time_point with it.
system_clock::time_point
system_clock::from_time_t(time_t t) BOOST_NOEXCEPT
{
return system_clock::time_point(seconds(t));
}
namespace chrono_detail
{
// steady_clock
// Note, in this implementation steady_clock and high_resolution_clock
// are the same clock. They are both based on mach_absolute_time().
// mach_absolute_time() * MachInfo.numer / MachInfo.denom is the number of
// nanoseconds since the computer booted up. MachInfo.numer and MachInfo.denom
// are run time constants supplied by the OS. This clock has no relationship
// to the Gregorian calendar. It's main use is as a high resolution timer.
// MachInfo.numer / MachInfo.denom is often 1 on the latest equipment. Specialize
// for that case as an optimization.
BOOST_CHRONO_STATIC
steady_clock::rep
steady_simplified()
{
return mach_absolute_time();
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
BOOST_CHRONO_STATIC
steady_clock::rep
steady_simplified_ec(system::error_code & ec)
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return mach_absolute_time();
}
#endif
BOOST_CHRONO_STATIC
double
compute_steady_factor(kern_return_t& err)
{
mach_timebase_info_data_t MachInfo;
err = mach_timebase_info(&MachInfo);
if ( err != 0 ) {
return 0;
}
return static_cast<double>(MachInfo.numer) / MachInfo.denom;
}
BOOST_CHRONO_STATIC
steady_clock::rep
steady_full()
{
kern_return_t err;
const double factor = chrono_detail::compute_steady_factor(err);
if (err != 0)
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
return static_cast<steady_clock::rep>(mach_absolute_time() * factor);
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
BOOST_CHRONO_STATIC
steady_clock::rep
steady_full_ec(system::error_code & ec)
{
kern_return_t err;
const double factor = chrono_detail::compute_steady_factor(err);
if (err != 0)
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
err,
::boost::system::system_category(),
"chrono::steady_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return steady_clock::rep();
}
}
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return static_cast<steady_clock::rep>(mach_absolute_time() * factor);
}
#endif
typedef steady_clock::rep (*FP)();
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
typedef steady_clock::rep (*FP_ec)(system::error_code &);
#endif
BOOST_CHRONO_STATIC
FP
init_steady_clock(kern_return_t & err)
{
mach_timebase_info_data_t MachInfo;
err = mach_timebase_info(&MachInfo);
if ( err != 0 )
{
return 0;
}
if (MachInfo.numer == MachInfo.denom)
{
return &chrono_detail::steady_simplified;
}
return &chrono_detail::steady_full;
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
BOOST_CHRONO_STATIC
FP_ec
init_steady_clock_ec(kern_return_t & err)
{
mach_timebase_info_data_t MachInfo;
err = mach_timebase_info(&MachInfo);
if ( err != 0 )
{
return 0;
}
if (MachInfo.numer == MachInfo.denom)
{
return &chrono_detail::steady_simplified_ec;
}
return &chrono_detail::steady_full_ec;
}
#endif
}
steady_clock::time_point
steady_clock::now() BOOST_NOEXCEPT
{
kern_return_t err;
chrono_detail::FP fp = chrono_detail::init_steady_clock(err);
if ( err != 0 )
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
return time_point(duration(fp()));
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
steady_clock::time_point
steady_clock::now(system::error_code & ec)
{
kern_return_t err;
chrono_detail::FP_ec fp = chrono_detail::init_steady_clock_ec(err);
if ( err != 0 )
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
err,
::boost::system::system_category(),
"chrono::steady_clock" ));
}
else
{
ec.assign( err, ::boost::system::system_category() );
return time_point();
}
}
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(duration(fp(ec)));
}
#endif
} // namespace chrono
} // namespace boost

View File

@@ -0,0 +1,356 @@
// boost process_cpu_clocks.cpp -----------------------------------------------------------//
// Copyright Beman Dawes 1994, 2006, 2008
// Copyright Vicente J. Botet Escriba 2009
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
//--------------------------------------------------------------------------------------//
#include <boost/chrono/config.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
#include <boost/assert.hpp>
#include <sys/time.h> //for gettimeofday and timeval
#include <sys/times.h> //for times
# include <unistd.h>
namespace boost
{
namespace chrono
{
namespace chrono_detail
{
inline long tick_factor() // multiplier to convert ticks
// to nanoseconds; -1 if unknown
{
long factor = 0;
if (!factor)
{
if ((factor = ::sysconf(_SC_CLK_TCK)) <= 0)
factor = -1;
else
{
BOOST_ASSERT(factor <= 1000000000l); // doesn't handle large ticks
factor = 1000000000l / factor; // compute factor
if (!factor)
factor = -1;
}
}
return factor;
}
}
process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT
{
#if 1
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
return time_point(nanoseconds(c * factor));
} else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
#else
clock_t c = ::clock();
if (c == clock_t(-1)) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
return time_point(nanoseconds(c * factor));
} else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
#endif
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_real_cpu_clock::time_point process_real_cpu_clock::now(system::error_code & ec)
{
#if 1
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(nanoseconds(c * factor));
} else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
}
}
#else
clock_t c = ::clock();
if (c == clock_t(-1)) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(nanoseconds(c * factor));
} else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
}
}
#endif
}
#endif
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_user_cpu_clock::time_point process_user_cpu_clock::now(system::error_code & ec)
{
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_user_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(nanoseconds((tm.tms_utime + tm.tms_cutime) * factor));
} else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_user_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
}
}
}
#endif
process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT
{
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
return time_point(nanoseconds((tm.tms_utime + tm.tms_cutime)
* factor));
} else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
}
process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT
{
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
return time_point(nanoseconds((tm.tms_stime + tm.tms_cstime)
* factor));
} else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_system_cpu_clock::time_point process_system_cpu_clock::now(system::error_code & ec)
{
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_system_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(nanoseconds((tm.tms_stime + tm.tms_cstime) * factor));
} else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_system_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
}
}
}
#endif
process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT
{
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
time_point::rep
r(c * factor, (tm.tms_utime + tm.tms_cutime) * factor, (tm.tms_stime
+ tm.tms_cstime) * factor);
return time_point(duration(r));
} else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_cpu_clock::time_point process_cpu_clock::now(system::error_code & ec)
{
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
time_point::rep
r(c * factor, (tm.tms_utime + tm.tms_cutime) * factor, (tm.tms_stime
+ tm.tms_cstime) * factor);
return time_point(duration(r));
} else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
}
}
}
#endif
}
}

View File

@@ -0,0 +1,92 @@
// boost thread_clock.cpp -----------------------------------------------------------//
// Copyright Beman Dawes 1994, 2006, 2008
// Copyright Vicente J. Botet Escriba 2009-2011
// Copyright Christopher Brown 2013
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
//--------------------------------------------------------------------------------------//
#include <boost/chrono/config.hpp>
#include <boost/chrono/thread_clock.hpp>
#include <cassert>
#include <boost/assert.hpp>
# include <pthread.h>
# include <mach/thread_act.h>
namespace boost { namespace chrono {
thread_clock::time_point thread_clock::now( ) BOOST_NOEXCEPT
{
// get the thread port (borrowing pthread's reference)
mach_port_t port = pthread_mach_thread_np(pthread_self());
// get the thread info
thread_basic_info_data_t info;
mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
if ( thread_info(port, THREAD_BASIC_INFO, (thread_info_t)&info, &count) != KERN_SUCCESS )
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
return time_point();
}
// convert to nanoseconds
duration user = duration(
static_cast<thread_clock::rep>( info.user_time.seconds ) * 1000000000
+ static_cast<thread_clock::rep>(info.user_time.microseconds ) * 1000);
duration system = duration(
static_cast<thread_clock::rep>( info.system_time.seconds ) * 1000000000
+ static_cast<thread_clock::rep>( info.system_time.microseconds ) * 1000);
return time_point( user + system );
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
thread_clock::time_point thread_clock::now( system::error_code & ec )
{
// get the thread port (borrowing pthread's reference)
mach_port_t port = pthread_mach_thread_np(pthread_self());
// get the thread info
thread_basic_info_data_t info;
mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
if ( thread_info(port, THREAD_BASIC_INFO, (thread_info_t)&info, &count) != KERN_SUCCESS )
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
EINVAL,
::boost::system::system_category(),
"chrono::thread_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
// convert to nanoseconds
duration user = duration(
static_cast<thread_clock::rep>( info.user_time.seconds ) * 1000000000
+ static_cast<thread_clock::rep>(info.user_time.microseconds ) * 1000);
duration system = duration(
static_cast<thread_clock::rep>( info.system_time.seconds ) * 1000000000
+ static_cast<thread_clock::rep>( info.system_time.microseconds ) * 1000);
return time_point( user + system );
}
#endif
} }

View File

@@ -0,0 +1,141 @@
// posix/chrono.cpp --------------------------------------------------------------//
// Copyright Beman Dawes 2008
// Copyright Vicente J. Botet Escriba 2009
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
//----------------------------------------------------------------------------//
// POSIX //
//----------------------------------------------------------------------------//
#include <time.h> // for clock_gettime
#include <boost/assert.hpp>
#include <boost/predef/os.h>
namespace boost
{
namespace chrono
{
system_clock::time_point system_clock::now() BOOST_NOEXCEPT
{
timespec ts;
if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
return time_point(duration(
static_cast<system_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
system_clock::time_point system_clock::now(system::error_code & ec)
{
timespec ts;
if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::system_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(duration(
static_cast<system_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
}
#endif
std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT
{
return static_cast<std::time_t>( t.time_since_epoch().count() / 1000000000 );
}
system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT
{
return time_point(duration(static_cast<system_clock::rep>(t) * 1000000000));
}
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT
{
timespec ts;
#if BOOST_OS_CYGWIN
// lack of thread safety in high resolution timer initialization
// can lead to a timespec of zero without an error; was reported
// to the cygwin mailing list and can be removed once fixed
do
{
#endif
if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
#if BOOST_OS_CYGWIN
} while (ts.tv_sec == 0 && ts.tv_nsec == 0);
#endif
return time_point(duration(
static_cast<steady_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
steady_clock::time_point steady_clock::now(system::error_code & ec)
{
timespec ts;
#if BOOST_OS_CYGWIN
// lack of thread safety in high resolution timer initialization
// can lead to a timespec of zero without an error; was reported
// to the cygwin mailing list and can be removed once fixed
do
{
#endif
if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::steady_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
#if BOOST_OS_CYGWIN
} while (ts.tv_sec == 0 && ts.tv_nsec == 0);
#endif
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(duration(
static_cast<steady_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
}
#endif
#endif
} // namespace chrono
} // namespace boost

View File

@@ -0,0 +1,354 @@
// boost process_cpu_clocks.cpp -----------------------------------------------------------//
// Copyright Beman Dawes 1994, 2006, 2008
// Copyright Vicente J. Botet Escriba 2009
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
//--------------------------------------------------------------------------------------//
#include <boost/chrono/config.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
#include <boost/assert.hpp>
#include <sys/times.h>
#include <unistd.h>
#include <time.h> // for clock_gettime
namespace boost { namespace chrono {
namespace chrono_detail
{
inline nanoseconds::rep tick_factor() // multiplier to convert ticks
// to nanoseconds; -1 if unknown
{
long factor = 0;
if ( !factor )
{
if ( (factor = ::sysconf( _SC_CLK_TCK )) <= 0 )
factor = -1;
else
{
BOOST_ASSERT( factor <= 1000000000l ); // doesn't handle large ticks
factor = 1000000000l / factor; // compute factor
if ( !factor ) factor = -1;
}
}
return factor;
}
}
process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
else
{
if ( chrono_detail::tick_factor() != -1 )
{
return time_point(
nanoseconds(c*chrono_detail::tick_factor()));
}
else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_real_cpu_clock::time_point process_real_cpu_clock::now(
system::error_code & ec)
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_real_cpu_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
else
{
if ( chrono_detail::tick_factor() != -1 )
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(
nanoseconds(c*chrono_detail::tick_factor()));
}
else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_real_cpu_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
}
}
#endif
process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
else
{
if ( chrono_detail::tick_factor() != -1 )
{
return time_point(
nanoseconds((tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor()));
}
else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_user_cpu_clock::time_point process_user_cpu_clock::now(
system::error_code & ec)
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_user_cpu_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
else
{
if ( chrono_detail::tick_factor() != -1 )
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(
nanoseconds((tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor()));
}
else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_user_cpu_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
}
}
#endif
process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
return time_point();
}
else
{
if ( chrono_detail::tick_factor() != -1 )
{
return time_point(
nanoseconds((tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor()));
}
else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
return time_point();
}
}
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_system_cpu_clock::time_point process_system_cpu_clock::now(
system::error_code & ec)
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_system_cpu_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
else
{
if ( chrono_detail::tick_factor() != -1 )
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(
nanoseconds((tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor()));
}
else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_system_cpu_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
}
}
#endif
process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
else
{
nanoseconds::rep factor = chrono_detail::tick_factor();
if ( factor != -1 )
{
time_point::rep r(
c*factor,
(tm.tms_utime + tm.tms_cutime)*factor,
(tm.tms_stime + tm.tms_cstime)*factor);
return time_point(duration(r));
}
else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_cpu_clock::time_point process_cpu_clock::now(
system::error_code & ec )
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
else
{
if ( chrono_detail::tick_factor() != -1 )
{
time_point::rep r(
c*chrono_detail::tick_factor(),
(tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor(),
(tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor());
return time_point(duration(r));
}
else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
}
}
#endif
} }

View File

@@ -0,0 +1,92 @@
// boost thread_clock.cpp -----------------------------------------------------------//
// Copyright Beman Dawes 1994, 2006, 2008
// Copyright Vicente J. Botet Escriba 2009-2011
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
//--------------------------------------------------------------------------------------//
#include <boost/chrono/config.hpp>
#include <boost/chrono/thread_clock.hpp>
#include <cassert>
#include <boost/assert.hpp>
#if !defined(__VXWORKS__)
# include <sys/times.h>
#endif
# include <pthread.h>
# include <unistd.h>
namespace boost { namespace chrono {
thread_clock::time_point thread_clock::now( ) BOOST_NOEXCEPT
{
struct timespec ts;
#if defined CLOCK_THREAD_CPUTIME_ID
// get the timespec associated to the thread clock
if ( ::clock_gettime( CLOCK_THREAD_CPUTIME_ID, &ts ) )
#else
// get the current thread
pthread_t pth=pthread_self();
// get the clock_id associated to the current thread
clockid_t clock_id;
pthread_getcpuclockid(pth, &clock_id);
// get the timespec associated to the thread clock
if ( ::clock_gettime( clock_id, &ts ) )
#endif
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
// transform to nanoseconds
return time_point(duration(
static_cast<thread_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
thread_clock::time_point thread_clock::now( system::error_code & ec )
{
struct timespec ts;
#if defined CLOCK_THREAD_CPUTIME_ID
// get the timespec associated to the thread clock
if ( ::clock_gettime( CLOCK_THREAD_CPUTIME_ID, &ts ) )
#else
// get the current thread
pthread_t pth=pthread_self();
// get the clock_id associated to the current thread
clockid_t clock_id;
pthread_getcpuclockid(pth, &clock_id);
// get the timespec associated to the thread clock
if ( ::clock_gettime( clock_id, &ts ) )
#endif
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::thread_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
// transform to nanoseconds
return time_point(duration(
static_cast<thread_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
}
#endif
} }

View File

@@ -0,0 +1,46 @@
// boost process_cpu_clocks.cpp -----------------------------------------------------------//
// Copyright 2009-2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
//--------------------------------------------------------------------------------------//
#ifndef BOOST_CHRONO_DETAIL_INLINED_PROCESS_CPU_CLOCKS_HPP
#define BOOST_CHRONO_DETAIL_INLINED_PROCESS_CPU_CLOCKS_HPP
#include <boost/chrono/config.hpp>
#if defined(BOOST_CHRONO_HAS_PROCESS_CLOCKS)
#include <boost/version.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
#include <boost/throw_exception.hpp>
#if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING
#include <boost/system/system_error.hpp>
#endif
//----------------------------------------------------------------------------//
// Windows //
//----------------------------------------------------------------------------//
#if defined(BOOST_CHRONO_WINDOWS_API)
#include <boost/chrono/detail/inlined/win/process_cpu_clocks.hpp>
//----------------------------------------------------------------------------//
// Mac //
//----------------------------------------------------------------------------//
#elif defined(BOOST_CHRONO_MAC_API)
#include <boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp>
//----------------------------------------------------------------------------//
// POSIX //
//----------------------------------------------------------------------------//
#elif defined(BOOST_CHRONO_POSIX_API)
#include <boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp>
#endif // POSIX
#endif
#endif

View File

@@ -0,0 +1,46 @@
// boost thread_clock.cpp -----------------------------------------------------------//
// Copyright 2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
//--------------------------------------------------------------------------------------//
#ifndef BOOST_CHRONO_DETAIL_INLINED_THREAD_CLOCK_HPP
#define BOOST_CHRONO_DETAIL_INLINED_THREAD_CLOCK_HPP
#include <boost/chrono/config.hpp>
#include <boost/version.hpp>
#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
#include <boost/chrono/thread_clock.hpp>
#include <boost/throw_exception.hpp>
#if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING
#include <boost/system/system_error.hpp>
#endif
#include <boost/throw_exception.hpp>
#include <boost/chrono/detail/system.hpp>
//----------------------------------------------------------------------------//
// Windows //
//----------------------------------------------------------------------------//
#if defined(BOOST_CHRONO_WINDOWS_API)
#include <boost/chrono/detail/inlined/win/thread_clock.hpp>
//----------------------------------------------------------------------------//
// Mac //
//----------------------------------------------------------------------------//
#elif defined(BOOST_CHRONO_MAC_API)
#include <boost/chrono/detail/inlined/mac/thread_clock.hpp>
//----------------------------------------------------------------------------//
// POSIX //
//----------------------------------------------------------------------------//
#elif defined(BOOST_CHRONO_POSIX_API)
#include <boost/chrono/detail/inlined/posix/thread_clock.hpp>
#endif // POSIX
#endif
#endif

View File

@@ -0,0 +1,151 @@
// win/chrono.cpp --------------------------------------------------------------//
// Copyright Beman Dawes 2008
// Copyright 2009-2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
//----------------------------------------------------------------------------//
// Windows //
//----------------------------------------------------------------------------//
#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP
#define BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP
#include <boost/winapi/time.hpp>
#include <boost/winapi/timers.hpp>
#include <boost/winapi/get_last_error.hpp>
#include <boost/winapi/error_codes.hpp>
#include <boost/assert.hpp>
namespace boost
{
namespace chrono
{
namespace chrono_detail
{
BOOST_CHRONO_INLINE double get_nanosecs_per_tic() BOOST_NOEXCEPT
{
boost::winapi::LARGE_INTEGER_ freq;
if ( !boost::winapi::QueryPerformanceFrequency( &freq ) )
return 0.0L;
return double(1000000000.0L / freq.QuadPart);
}
}
steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT
{
double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
boost::winapi::LARGE_INTEGER_ pcount;
if ( nanosecs_per_tic <= 0.0L )
{
BOOST_ASSERT(0 && "Boost::Chrono - get_nanosecs_per_tic Internal Error");
return steady_clock::time_point();
}
unsigned times=0;
while ( ! boost::winapi::QueryPerformanceCounter( &pcount ) )
{
if ( ++times > 3 )
{
BOOST_ASSERT(0 && "Boost::Chrono - QueryPerformanceCounter Internal Error");
return steady_clock::time_point();
}
}
return steady_clock::time_point(steady_clock::duration(
static_cast<steady_clock::rep>((nanosecs_per_tic) * pcount.QuadPart)));
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
steady_clock::time_point steady_clock::now( system::error_code & ec )
{
double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
boost::winapi::LARGE_INTEGER_ pcount;
if ( (nanosecs_per_tic <= 0.0L)
|| (!boost::winapi::QueryPerformanceCounter( &pcount )) )
{
boost::winapi::DWORD_ cause =
((nanosecs_per_tic <= 0.0L)
? boost::winapi::ERROR_NOT_SUPPORTED_
: boost::winapi::GetLastError());
if (::boost::chrono::is_throws(ec)) {
boost::throw_exception(
system::system_error(
cause,
::boost::system::system_category(),
"chrono::steady_clock" ));
}
else
{
ec.assign( cause, ::boost::system::system_category() );
return steady_clock::time_point(duration(0));
}
}
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(duration(
static_cast<steady_clock::rep>(nanosecs_per_tic * pcount.QuadPart)));
}
#endif
BOOST_CHRONO_INLINE
system_clock::time_point system_clock::now() BOOST_NOEXCEPT
{
boost::winapi::FILETIME_ ft;
boost::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
return system_clock::time_point(
system_clock::duration(
((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)
- 116444736000000000LL
//- (134775LL*864000000000LL)
)
);
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
BOOST_CHRONO_INLINE
system_clock::time_point system_clock::now( system::error_code & ec )
{
boost::winapi::FILETIME_ ft;
boost::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return system_clock::time_point(
system_clock::duration(
((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)
- 116444736000000000LL
//- (134775LL*864000000000LL)
));
}
#endif
BOOST_CHRONO_INLINE
std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT
{
__int64 temp = t.time_since_epoch().count();
temp /= 10000000;
return static_cast<std::time_t>( temp );
}
BOOST_CHRONO_INLINE
system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT
{
__int64 temp = t;
temp *= 10000000;
return time_point(duration(temp));
}
} // namespace chrono
} // namespace boost
#endif

View File

@@ -0,0 +1,281 @@
// boost process_timer.cpp -----------------------------------------------------------//
// Copyright Beman Dawes 1994, 2006, 2008
// Copyright 2009-2010 Vicente J. Botet Escriba
// Copyright (c) Microsoft Corporation 2014
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
//--------------------------------------------------------------------------------------//
#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_PROCESS_CLOCK_HPP
#define BOOST_CHRONO_DETAIL_INLINED_WIN_PROCESS_CLOCK_HPP
#include <boost/chrono/config.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
#include <cassert>
#include <time.h>
#include <boost/assert.hpp>
#include <boost/winapi/get_last_error.hpp>
#include <boost/winapi/get_current_process.hpp>
#if BOOST_PLAT_WINDOWS_DESKTOP
#include <boost/winapi/get_process_times.hpp>
#endif
namespace boost
{
namespace chrono
{
process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT
{
clock_t c = ::clock();
if ( c == clock_t(-1) ) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
typedef ratio_divide<giga, ratio<CLOCKS_PER_SEC> >::type R;
return time_point(
duration(static_cast<rep>(c)*R::num/R::den)
);
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_real_cpu_clock::time_point process_real_cpu_clock::now(
system::error_code & ec)
{
clock_t c = ::clock();
if ( c == clock_t(-1) ) // error
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_real_cpu_clock" ));
}
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
typedef ratio_divide<giga, ratio<CLOCKS_PER_SEC> >::type R;
return time_point(
duration(static_cast<rep>(c)*R::num/R::den)
);
}
#endif
#if BOOST_PLAT_WINDOWS_DESKTOP
process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT
{
// note that Windows uses 100 nanosecond ticks for FILETIME
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
if ( boost::winapi::GetProcessTimes(
boost::winapi::GetCurrentProcess(), &creation, &exit,
&system_time, &user_time ) )
{
return time_point(duration(
((static_cast<process_user_cpu_clock::rep>(user_time.dwHighDateTime) << 32)
| user_time.dwLowDateTime) * 100
));
}
else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
return time_point();
}
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_user_cpu_clock::time_point process_user_cpu_clock::now(
system::error_code & ec)
{
// note that Windows uses 100 nanosecond ticks for FILETIME
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
if ( boost::winapi::GetProcessTimes(
boost::winapi::GetCurrentProcess(), &creation, &exit,
&system_time, &user_time ) )
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(duration(
((static_cast<process_user_cpu_clock::rep>(user_time.dwHighDateTime) << 32)
| user_time.dwLowDateTime) * 100
));
}
else
{
boost::winapi::DWORD_ cause = boost::winapi::GetLastError();
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
cause,
::boost::system::system_category(),
"chrono::process_user_cpu_clock" ));
}
else
{
ec.assign( cause, ::boost::system::system_category() );
return time_point();
}
}
}
#endif
process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT
{
// note that Windows uses 100 nanosecond ticks for FILETIME
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
if ( boost::winapi::GetProcessTimes(
boost::winapi::GetCurrentProcess(), &creation, &exit,
&system_time, &user_time ) )
{
return time_point(duration(
((static_cast<process_system_cpu_clock::rep>(system_time.dwHighDateTime) << 32)
| system_time.dwLowDateTime) * 100
));
}
else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
return time_point();
}
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_system_cpu_clock::time_point process_system_cpu_clock::now(
system::error_code & ec)
{
// note that Windows uses 100 nanosecond ticks for FILETIME
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
if ( boost::winapi::GetProcessTimes(
boost::winapi::GetCurrentProcess(), &creation, &exit,
&system_time, &user_time ) )
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(duration(
((static_cast<process_system_cpu_clock::rep>(system_time.dwHighDateTime) << 32)
| system_time.dwLowDateTime) * 100
));
}
else
{
boost::winapi::DWORD_ cause = boost::winapi::GetLastError();
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
cause,
::boost::system::system_category(),
"chrono::process_system_cpu_clock" ));
}
else
{
ec.assign( cause, ::boost::system::system_category() );
return time_point();
}
}
}
#endif
process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT
{
// note that Windows uses 100 nanosecond ticks for FILETIME
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
if ( boost::winapi::GetProcessTimes(
boost::winapi::GetCurrentProcess(), &creation, &exit,
&system_time, &user_time ) )
{
time_point::rep r(process_real_cpu_clock::now().time_since_epoch().count()
,
((static_cast<process_user_cpu_clock::rep>(user_time.dwHighDateTime) << 32)
| user_time.dwLowDateTime
) * 100,
((static_cast<process_system_cpu_clock::rep>(system_time.dwHighDateTime) << 32)
| system_time.dwLowDateTime
) * 100
);
return time_point(duration(r));
}
else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
return time_point();
}
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_cpu_clock::time_point process_cpu_clock::now(
system::error_code & ec )
{
// note that Windows uses 100 nanosecond ticks for FILETIME
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
if ( boost::winapi::GetProcessTimes(
boost::winapi::GetCurrentProcess(), &creation, &exit,
&system_time, &user_time ) )
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
time_point::rep r(process_real_cpu_clock::now().time_since_epoch().count()
,
((static_cast<process_user_cpu_clock::rep>(user_time.dwHighDateTime) << 32)
| user_time.dwLowDateTime
) * 100,
((static_cast<process_system_cpu_clock::rep>(system_time.dwHighDateTime) << 32)
| system_time.dwLowDateTime
) * 100
);
return time_point(duration(r));
}
else
{
boost::winapi::DWORD_ cause = boost::winapi::GetLastError();
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
cause,
::boost::system::system_category(),
"chrono::process_cpu_clock" ));
}
else
{
ec.assign( cause, ::boost::system::system_category() );
return time_point();
}
}
}
#endif
#endif
} // namespace chrono
} // namespace boost
#endif

View File

@@ -0,0 +1,103 @@
// boost thread_clock.cpp -----------------------------------------------------------//
// Copyright 2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
//--------------------------------------------------------------------------------------//
#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_THREAD_CLOCK_HPP
#define BOOST_CHRONO_DETAIL_INLINED_WIN_THREAD_CLOCK_HPP
#include <boost/chrono/config.hpp>
#include <boost/chrono/thread_clock.hpp>
#include <cassert>
#include <boost/assert.hpp>
#include <boost/winapi/get_last_error.hpp>
#include <boost/winapi/get_current_thread.hpp>
#include <boost/winapi/get_thread_times.hpp>
namespace boost
{
namespace chrono
{
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
thread_clock::time_point thread_clock::now( system::error_code & ec )
{
// note that Windows uses 100 nanosecond ticks for FILETIME
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
if ( boost::winapi::GetThreadTimes(
boost::winapi::GetCurrentThread (), &creation, &exit,
&system_time, &user_time ) )
{
duration user = duration(
((static_cast<duration::rep>(user_time.dwHighDateTime) << 32)
| user_time.dwLowDateTime) * 100 );
duration system = duration(
((static_cast<duration::rep>(system_time.dwHighDateTime) << 32)
| system_time.dwLowDateTime) * 100 );
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(system+user);
}
else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
boost::winapi::GetLastError(),
::boost::system::system_category(),
"chrono::thread_clock" ));
}
else
{
ec.assign( boost::winapi::GetLastError(), ::boost::system::system_category() );
return thread_clock::time_point(duration(0));
}
}
}
#endif
thread_clock::time_point thread_clock::now() BOOST_NOEXCEPT
{
// note that Windows uses 100 nanosecond ticks for FILETIME
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
if ( boost::winapi::GetThreadTimes(
boost::winapi::GetCurrentThread (), &creation, &exit,
&system_time, &user_time ) )
{
duration user = duration(
((static_cast<duration::rep>(user_time.dwHighDateTime) << 32)
| user_time.dwLowDateTime) * 100 );
duration system = duration(
((static_cast<duration::rep>(system_time.dwHighDateTime) << 32)
| system_time.dwLowDateTime) * 100 );
return time_point(system+user);
}
else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
return time_point();
}
}
} // namespace chrono
} // namespace boost
#endif

View File

@@ -0,0 +1,31 @@
// is_evenly_divisible_by.hpp --------------------------------------------------------------//
// Copyright 2009-2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP
#define BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP
#include <boost/chrono/config.hpp>
#include <boost/mpl/logical.hpp>
#include <boost/ratio/detail/overflow_helpers.hpp>
namespace boost {
namespace chrono {
namespace chrono_detail {
// template <class R1, class R2>
// struct is_evenly_divisible_by : public boost::mpl::bool_ < ratio_divide<R1, R2>::type::den == 1 >
// {};
template <class R1, class R2>
struct is_evenly_divisible_by : public boost::ratio_detail::is_evenly_divisible_by<R1, R2>
{};
} // namespace chrono_detail
} // namespace detail
} // namespace chrono
#endif // BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP

View File

@@ -0,0 +1,54 @@
// is_evenly_divisible_by.hpp --------------------------------------------------------------//
// Copyright 2009-2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_CHRONO_DETAIL_NO_WARNING_SIGNED_UNSIGNED_CMP_HPP
#define BOOST_CHRONO_DETAIL_NO_WARNING_SIGNED_UNSIGNED_CMP_HPP
//
// We simply cannot include this header on gcc without getting copious warnings of the kind:
//
//../../../boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp:37: warning: comparison between signed and unsigned integer expressions
//
// And yet there is no other reasonable implementation, so we declare this a system header
// to suppress these warnings.
//
#if defined(__GNUC__) && (__GNUC__ >= 4)
#pragma GCC system_header
#elif defined __SUNPRO_CC
#pragma disable_warn
#elif defined _MSC_VER
#pragma warning(push, 1)
#endif
namespace boost {
namespace chrono {
namespace detail {
template <class T, class U>
bool lt(T t, U u)
{
return t < u;
}
template <class T, class U>
bool gt(T t, U u)
{
return t > u;
}
} // namespace detail
} // namespace detail
} // namespace chrono
#if defined __SUNPRO_CC
#pragma enable_warn
#elif defined _MSC_VER
#pragma warning(pop)
#endif
#endif // BOOST_CHRONO_DETAIL_NO_WARNING_SIGNED_UNSIGNED_CMP_HPP

View File

@@ -0,0 +1,163 @@
// scan_keyword.hpp --------------------------------------------------------------//
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// Adaptation to Boost of the libcxx
// Copyright 2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_CHRONO_DETAIL_SCAN_KEYWORD_HPP
#define BOOST_CHRONO_DETAIL_SCAN_KEYWORD_HPP
#include <boost/chrono/config.hpp>
#include <boost/move/unique_ptr.hpp>
#include <ios>
#include <exception>
#include <stdlib.h>
#include <boost/throw_exception.hpp>
namespace boost {
using movelib::unique_ptr;
namespace chrono {
namespace chrono_detail {
inline void free_aux(void* ptr) { free(ptr); }
// scan_keyword
// Scans [b, e) until a match is found in the basic_strings range
// [kb, ke) or until it can be shown that there is no match in [kb, ke).
// b will be incremented (visibly), consuming CharT until a match is found
// or proved to not exist. A keyword may be "", in which will match anything.
// If one keyword is a prefix of another, and the next CharT in the input
// might match another keyword, the algorithm will attempt to find the longest
// matching keyword. If the longer matching keyword ends up not matching, then
// no keyword match is found. If no keyword match is found, ke is returned
// and failbit is set in err.
// Else an iterator pointing to the matching keyword is found. If more than
// one keyword matches, an iterator to the first matching keyword is returned.
// If on exit b == e, eofbit is set in err.
// Examples:
// Keywords: "a", "abb"
// If the input is "a", the first keyword matches and eofbit is set.
// If the input is "abc", no match is found and "ab" are consumed.
template <class InputIterator, class ForwardIterator>
ForwardIterator
scan_keyword(InputIterator& b, InputIterator e,
ForwardIterator kb, ForwardIterator ke,
std::ios_base::iostate& err
)
{
typedef typename std::iterator_traits<InputIterator>::value_type CharT;
size_t nkw = std::distance(kb, ke);
const unsigned char doesnt_match = '\0';
const unsigned char might_match = '\1';
const unsigned char does_match = '\2';
unsigned char statbuf[100];
unsigned char* status = statbuf;
// Change free by free_aux to avoid
// Error: Could not find a match for boost::interprocess::unique_ptr<unsigned char, void(*)(void*)>::unique_ptr(int, extern "C" void(void*))
unique_ptr<unsigned char, void(*)(void*)> stat_hold(0, free_aux);
if (nkw > sizeof(statbuf))
{
status = (unsigned char*)malloc(nkw);
if (status == 0)
throw_exception(std::bad_alloc());
stat_hold.reset(status);
}
size_t n_might_match = nkw; // At this point, any keyword might match
size_t n_does_match = 0; // but none of them definitely do
// Initialize all statuses to might_match, except for "" keywords are does_match
unsigned char* st = status;
for (ForwardIterator ky = kb; ky != ke; ++ky, ++st)
{
if (!ky->empty())
*st = might_match;
else
{
*st = does_match;
--n_might_match;
++n_does_match;
}
}
// While there might be a match, test keywords against the next CharT
for (size_t indx = 0; b != e && n_might_match > 0; ++indx)
{
// Peek at the next CharT but don't consume it
CharT c = *b;
bool consume = false;
// For each keyword which might match, see if the indx character is c
// If a match if found, consume c
// If a match is found, and that is the last character in the keyword,
// then that keyword matches.
// If the keyword doesn't match this character, then change the keyword
// to doesn't match
st = status;
for (ForwardIterator ky = kb; ky != ke; ++ky, ++st)
{
if (*st == might_match)
{
CharT kc = (*ky)[indx];
if (c == kc)
{
consume = true;
if (ky->size() == indx+1)
{
*st = does_match;
--n_might_match;
++n_does_match;
}
}
else
{
*st = doesnt_match;
--n_might_match;
}
}
}
// consume if we matched a character
if (consume)
{
++b;
// If we consumed a character and there might be a matched keyword that
// was marked matched on a previous iteration, then such keywords
// which are now marked as not matching.
if (n_might_match + n_does_match > 1)
{
st = status;
for (ForwardIterator ky = kb; ky != ke; ++ky, ++st)
{
if (*st == does_match && ky->size() != indx+1)
{
*st = doesnt_match;
--n_does_match;
}
}
}
}
}
// We've exited the loop because we hit eof and/or we have no more "might matches".
if (b == e)
err |= std::ios_base::eofbit;
// Return the first matching result
for (st = status; kb != ke; ++kb, ++st)
if (*st == does_match)
break;
if (kb == ke)
err |= std::ios_base::failbit;
return kb;
}
}
}
}
#endif // BOOST_CHRONO_DETAIL_SCAN_KEYWORD_HPP

View File

@@ -0,0 +1,30 @@
// static_assert.hpp --------------------------------------------------------------//
// Copyright 2009-2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP
#define BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP
#include <boost/chrono/config.hpp>
#ifndef BOOST_NO_CXX11_STATIC_ASSERT
#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
#elif defined(BOOST_CHRONO_USES_STATIC_ASSERT)
#include <boost/static_assert.hpp>
#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
#elif defined(BOOST_CHRONO_USES_MPL_ASSERT)
#include <boost/mpl/assert.hpp>
#include <boost/mpl/bool.hpp>
#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) \
BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
#else
//~ #elif defined(BOOST_CHRONO_USES_ARRAY_ASSERT)
#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_JOIN(boost_chrono_test_,__LINE__)[(CND)?1:-1]
//~ #define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES)
#endif
#endif // BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP

View File

@@ -0,0 +1,20 @@
// Copyright 2009-2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_CHRONO_DETAIL_SYSTEM_HPP
#define BOOST_CHRONO_DETAIL_SYSTEM_HPP
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
#include <boost/system/error_code.hpp>
namespace boost {
namespace chrono {
inline bool is_throws(system::error_code & ec) { return (&ec==&boost::throws()); }
}
}
#endif
#endif

View File

@@ -0,0 +1,798 @@
// duration.hpp --------------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Copyright 2009-2011 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
/*
This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
The original code was modified to conform to Boost conventions and to section
20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Much thanks to Andrei Alexandrescu,
Walter Brown,
Peter Dimov,
Jeff Garland,
Terry Golubiewski,
Daniel Krugler,
Anthony Williams.
*/
#ifndef BOOST_CHRONO_DURATION_HPP
#define BOOST_CHRONO_DURATION_HPP
#include <boost/chrono/config.hpp>
#include <boost/chrono/detail/static_assert.hpp>
#include <climits>
#include <limits>
#include <boost/mpl/logical.hpp>
#include <boost/ratio/ratio.hpp>
#include <boost/type_traits/common_type.hpp>
#include <boost/type_traits/is_arithmetic.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/is_floating_point.hpp>
#include <boost/type_traits/is_unsigned.hpp>
#include <boost/chrono/detail/is_evenly_divisible_by.hpp>
#include <boost/cstdint.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/integer_traits.hpp>
#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || !defined(BOOST_CHRONO_USES_MPL_ASSERT)
#define BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION "A duration representation can not be a duration"
#define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO "Second template parameter of duration must be a boost::ratio"
#define BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE "duration period must be positive"
#define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION "Second template parameter of time_point must be a boost::chrono::duration"
#endif
#ifndef BOOST_CHRONO_HEADER_ONLY
// this must occur after all of the includes and before any code appears:
#include <boost/config/abi_prefix.hpp> // must be the last #include
#endif
//----------------------------------------------------------------------------//
// //
// 20.9 Time utilities [time] //
// synopsis //
// //
//----------------------------------------------------------------------------//
namespace boost {
namespace chrono {
template <class Rep, class Period = ratio<1> >
class duration;
namespace detail
{
template <class T>
struct is_duration
: boost::false_type {};
template <class Rep, class Period>
struct is_duration<duration<Rep, Period> >
: boost::true_type {};
template <class Duration, class Rep, bool = is_duration<Rep>::value>
struct duration_divide_result
{
};
template <class Duration, class Rep2,
bool = (
((boost::is_convertible<typename Duration::rep,
typename common_type<typename Duration::rep, Rep2>::type>::value))
&& ((boost::is_convertible<Rep2,
typename common_type<typename Duration::rep, Rep2>::type>::value))
)
>
struct duration_divide_imp
{
};
template <class Rep1, class Period, class Rep2>
struct duration_divide_imp<duration<Rep1, Period>, Rep2, true>
{
typedef duration<typename common_type<Rep1, Rep2>::type, Period> type;
};
template <class Rep1, class Period, class Rep2>
struct duration_divide_result<duration<Rep1, Period>, Rep2, false>
: duration_divide_imp<duration<Rep1, Period>, Rep2>
{
};
///
template <class Rep, class Duration, bool = is_duration<Rep>::value>
struct duration_divide_result2
{
};
template <class Rep, class Duration,
bool = (
((boost::is_convertible<typename Duration::rep,
typename common_type<typename Duration::rep, Rep>::type>::value))
&& ((boost::is_convertible<Rep,
typename common_type<typename Duration::rep, Rep>::type>::value))
)
>
struct duration_divide_imp2
{
};
template <class Rep1, class Rep2, class Period >
struct duration_divide_imp2<Rep1, duration<Rep2, Period>, true>
{
//typedef typename common_type<Rep1, Rep2>::type type;
typedef double type;
};
template <class Rep1, class Rep2, class Period >
struct duration_divide_result2<Rep1, duration<Rep2, Period>, false>
: duration_divide_imp2<Rep1, duration<Rep2, Period> >
{
};
///
template <class Duration, class Rep, bool = is_duration<Rep>::value>
struct duration_modulo_result
{
};
template <class Duration, class Rep2,
bool = (
//boost::is_convertible<typename Duration::rep,
//typename common_type<typename Duration::rep, Rep2>::type>::value
//&&
boost::is_convertible<Rep2,
typename common_type<typename Duration::rep, Rep2>::type>::value
)
>
struct duration_modulo_imp
{
};
template <class Rep1, class Period, class Rep2>
struct duration_modulo_imp<duration<Rep1, Period>, Rep2, true>
{
typedef duration<typename common_type<Rep1, Rep2>::type, Period> type;
};
template <class Rep1, class Period, class Rep2>
struct duration_modulo_result<duration<Rep1, Period>, Rep2, false>
: duration_modulo_imp<duration<Rep1, Period>, Rep2>
{
};
} // namespace detail
} // namespace chrono
// common_type trait specializations
template <class Rep1, class Period1, class Rep2, class Period2>
struct common_type<chrono::duration<Rep1, Period1>,
chrono::duration<Rep2, Period2> >;
namespace chrono {
// customization traits
template <class Rep> struct treat_as_floating_point;
template <class Rep> struct duration_values;
// convenience typedefs
typedef duration<boost::int_least64_t, nano> nanoseconds; // at least 64 bits needed
typedef duration<boost::int_least64_t, micro> microseconds; // at least 55 bits needed
typedef duration<boost::int_least64_t, milli> milliseconds; // at least 45 bits needed
typedef duration<boost::int_least64_t> seconds; // at least 35 bits needed
typedef duration<boost::int_least32_t, ratio< 60> > minutes; // at least 29 bits needed
typedef duration<boost::int_least32_t, ratio<3600> > hours; // at least 23 bits needed
//----------------------------------------------------------------------------//
// duration helpers //
//----------------------------------------------------------------------------//
namespace detail
{
// duration_cast
// duration_cast is the heart of this whole prototype. It can convert any
// duration to any other. It is also (implicitly) used in converting
// time_points. The conversion is always exact if possible. And it is
// always as efficient as hand written code. If different representations
// are involved, care is taken to never require implicit conversions.
// Instead static_cast is used explicitly for every required conversion.
// If there are a mixture of integral and floating point representations,
// the use of common_type ensures that the most logical "intermediate"
// representation is used.
template <class FromDuration, class ToDuration,
class Period,
bool PeriodNumEq1,
bool PeriodDenEq1>
struct duration_cast_aux;
// When the two periods are the same, all that is left to do is static_cast from
// the source representation to the target representation (which may be a no-op).
// This conversion is always exact as long as the static_cast from the source
// representation to the destination representation is exact.
template <class FromDuration, class ToDuration, class Period>
struct duration_cast_aux<FromDuration, ToDuration, Period, true, true>
{
BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
{
return ToDuration(static_cast<typename ToDuration::rep>(fd.count()));
}
};
// When the numerator of FromPeriod / ToPeriod is 1, then all we need to do is
// divide by the denominator of FromPeriod / ToPeriod. The common_type of
// the two representations is used for the intermediate computation before
// static_cast'ing to the destination.
// This conversion is generally not exact because of the division (but could be
// if you get lucky on the run time value of fd.count()).
template <class FromDuration, class ToDuration, class Period>
struct duration_cast_aux<FromDuration, ToDuration, Period, true, false>
{
BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
{
typedef typename common_type<
typename ToDuration::rep,
typename FromDuration::rep,
boost::intmax_t>::type C;
return ToDuration(static_cast<typename ToDuration::rep>(
static_cast<C>(fd.count()) / static_cast<C>(Period::den)));
}
};
// When the denominator of FromPeriod / ToPeriod is 1, then all we need to do is
// multiply by the numerator of FromPeriod / ToPeriod. The common_type of
// the two representations is used for the intermediate computation before
// static_cast'ing to the destination.
// This conversion is always exact as long as the static_cast's involved are exact.
template <class FromDuration, class ToDuration, class Period>
struct duration_cast_aux<FromDuration, ToDuration, Period, false, true>
{
BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
{
typedef typename common_type<
typename ToDuration::rep,
typename FromDuration::rep,
boost::intmax_t>::type C;
return ToDuration(static_cast<typename ToDuration::rep>(
static_cast<C>(fd.count()) * static_cast<C>(Period::num)));
}
};
// When neither the numerator or denominator of FromPeriod / ToPeriod is 1, then we need to
// multiply by the numerator and divide by the denominator of FromPeriod / ToPeriod. The
// common_type of the two representations is used for the intermediate computation before
// static_cast'ing to the destination.
// This conversion is generally not exact because of the division (but could be
// if you get lucky on the run time value of fd.count()).
template <class FromDuration, class ToDuration, class Period>
struct duration_cast_aux<FromDuration, ToDuration, Period, false, false>
{
BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
{
typedef typename common_type<
typename ToDuration::rep,
typename FromDuration::rep,
boost::intmax_t>::type C;
return ToDuration(static_cast<typename ToDuration::rep>(
static_cast<C>(fd.count()) * static_cast<C>(Period::num)
/ static_cast<C>(Period::den)));
}
};
template <class FromDuration, class ToDuration>
struct duration_cast {
typedef typename ratio_divide<typename FromDuration::period,
typename ToDuration::period>::type Period;
typedef duration_cast_aux<
FromDuration,
ToDuration,
Period,
Period::num == 1,
Period::den == 1
> Aux;
BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
{
return Aux()(fd);
}
};
} // namespace detail
//----------------------------------------------------------------------------//
// //
// 20.9.2 Time-related traits [time.traits] //
// //
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// 20.9.2.1 treat_as_floating_point [time.traits.is_fp] //
// Probably should have been treat_as_floating_point. Editor notifed. //
//----------------------------------------------------------------------------//
// Support bidirectional (non-exact) conversions for floating point rep types
// (or user defined rep types which specialize treat_as_floating_point).
template <class Rep>
struct treat_as_floating_point : boost::is_floating_point<Rep> {};
//----------------------------------------------------------------------------//
// 20.9.2.2 duration_values [time.traits.duration_values] //
//----------------------------------------------------------------------------//
namespace detail {
template <class T, bool = is_arithmetic<T>::value>
struct chrono_numeric_limits {
static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits<T>::min) ();}
};
template <class T>
struct chrono_numeric_limits<T,true> {
static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits<T>::min) ();}
};
template <>
struct chrono_numeric_limits<float,true> {
static BOOST_CHRONO_LIB_CONSTEXPR float lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW
{
return -(std::numeric_limits<float>::max) ();
}
};
template <>
struct chrono_numeric_limits<double,true> {
static BOOST_CHRONO_LIB_CONSTEXPR double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW
{
return -(std::numeric_limits<double>::max) ();
}
};
template <>
struct chrono_numeric_limits<long double,true> {
static BOOST_CHRONO_LIB_CONSTEXPR long double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW
{
return -(std::numeric_limits<long double>::max)();
}
};
template <class T>
struct numeric_limits : chrono_numeric_limits<typename remove_cv<T>::type>
{};
}
template <class Rep>
struct duration_values
{
static BOOST_CONSTEXPR Rep zero() {return Rep(0);}
static BOOST_CHRONO_LIB_CONSTEXPR Rep max BOOST_PREVENT_MACRO_SUBSTITUTION ()
{
return (std::numeric_limits<Rep>::max)();
}
static BOOST_CHRONO_LIB_CONSTEXPR Rep min BOOST_PREVENT_MACRO_SUBSTITUTION ()
{
return detail::numeric_limits<Rep>::lowest();
}
};
} // namespace chrono
//----------------------------------------------------------------------------//
// 20.9.2.3 Specializations of common_type [time.traits.specializations] //
//----------------------------------------------------------------------------//
template <class Rep1, class Period1, class Rep2, class Period2>
struct common_type<chrono::duration<Rep1, Period1>,
chrono::duration<Rep2, Period2> >
{
typedef chrono::duration<typename common_type<Rep1, Rep2>::type,
typename boost::ratio_gcd<Period1, Period2>::type> type;
};
//----------------------------------------------------------------------------//
// //
// 20.9.3 Class template duration [time.duration] //
// //
//----------------------------------------------------------------------------//
namespace chrono {
template <class Rep, class Period>
class BOOST_SYMBOL_VISIBLE duration
{
//BOOST_CHRONO_STATIC_ASSERT(boost::is_integral<Rep>::value, BOOST_CHRONO_A_DURATION_REPRESENTATION_MUST_BE_INTEGRAL, ());
BOOST_CHRONO_STATIC_ASSERT(!boost::chrono::detail::is_duration<Rep>::value,
BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION, ());
BOOST_CHRONO_STATIC_ASSERT(boost::ratio_detail::is_ratio<typename Period::type>::value,
BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO, ());
BOOST_CHRONO_STATIC_ASSERT(Period::num>0,
BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE, ());
public:
typedef Rep rep;
typedef Period period;
private:
rep rep_;
public:
#if defined BOOST_CHRONO_DURATION_DEFAULTS_TO_ZERO
BOOST_FORCEINLINE BOOST_CONSTEXPR
duration() : rep_(duration_values<rep>::zero()) { }
#elif defined BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
BOOST_CONSTEXPR duration() {}
#else
BOOST_CONSTEXPR duration() = default;
#endif
template <class Rep2>
BOOST_SYMBOL_VISIBLE BOOST_FORCEINLINE BOOST_CONSTEXPR
explicit duration(const Rep2& r
, typename boost::enable_if <
mpl::and_ <
boost::is_convertible<Rep2, rep>,
mpl::or_ <
treat_as_floating_point<rep>,
mpl::and_ <
mpl::not_ < treat_as_floating_point<rep> >,
mpl::not_ < treat_as_floating_point<Rep2> >
>
>
>
>::type* = 0
) : rep_(r) { }
#if defined BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
duration& operator=(const duration& rhs)
{
if (&rhs != this) rep_= rhs.rep_;
return *this;
}
#else
duration& operator=(const duration& rhs) = default;
#endif
// conversions
template <class Rep2, class Period2>
BOOST_FORCEINLINE BOOST_CONSTEXPR
duration(const duration<Rep2, Period2>& d
, typename boost::enable_if <
mpl::or_ <
treat_as_floating_point<rep>,
mpl::and_ <
chrono_detail::is_evenly_divisible_by<Period2, period>,
mpl::not_ < treat_as_floating_point<Rep2> >
>
>
>::type* = 0
)
: rep_(chrono::detail::duration_cast<duration<Rep2, Period2>, duration>()(d).count()) {}
// observer
BOOST_CONSTEXPR
rep count() const {return rep_;}
// arithmetic
BOOST_CONSTEXPR
duration operator+() const {return duration(rep_);;}
BOOST_CONSTEXPR
duration operator-() const {return duration(-rep_);}
duration& operator++() {++rep_; return *this;}
duration operator++(int) {return duration(rep_++);}
duration& operator--() {--rep_; return *this;}
duration operator--(int) {return duration(rep_--);}
duration& operator+=(const duration& d)
{
rep_ += d.count(); return *this;
}
duration& operator-=(const duration& d)
{
rep_ -= d.count(); return *this;
}
duration& operator*=(const rep& rhs) {rep_ *= rhs; return *this;}
duration& operator/=(const rep& rhs) {rep_ /= rhs; return *this;}
duration& operator%=(const rep& rhs) {rep_ %= rhs; return *this;}
duration& operator%=(const duration& rhs)
{
rep_ %= rhs.count(); return *this;
}
// 20.9.3.4 duration special values [time.duration.special]
static BOOST_CONSTEXPR duration zero()
{
return duration(duration_values<rep>::zero());
}
static BOOST_CHRONO_LIB_CONSTEXPR duration min BOOST_PREVENT_MACRO_SUBSTITUTION ()
{
return duration((duration_values<rep>::min)());
}
static BOOST_CHRONO_LIB_CONSTEXPR duration max BOOST_PREVENT_MACRO_SUBSTITUTION ()
{
return duration((duration_values<rep>::max)());
}
};
//----------------------------------------------------------------------------//
// 20.9.3.5 duration non-member arithmetic [time.duration.nonmember] //
//----------------------------------------------------------------------------//
// Duration +
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
operator+(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs)
{
typedef typename common_type<duration<Rep1, Period1>,
duration<Rep2, Period2> >::type common_duration;
return common_duration(common_duration(lhs).count()+common_duration(rhs).count());
}
// Duration -
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
operator-(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs)
{
typedef typename common_type<duration<Rep1, Period1>,
duration<Rep2, Period2> >::type common_duration;
return common_duration(common_duration(lhs).count()-common_duration(rhs).count());
}
// Duration *
template <class Rep1, class Period, class Rep2>
inline BOOST_CONSTEXPR
typename boost::enable_if <
mpl::and_ <
boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>,
boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>
>,
duration<typename common_type<Rep1, Rep2>::type, Period>
>::type
operator*(const duration<Rep1, Period>& d, const Rep2& s)
{
typedef typename common_type<Rep1, Rep2>::type common_rep;
typedef duration<common_rep, Period> common_duration;
return common_duration(common_duration(d).count()*static_cast<common_rep>(s));
}
template <class Rep1, class Period, class Rep2>
inline BOOST_CONSTEXPR
typename boost::enable_if <
mpl::and_ <
boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>,
boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>
>,
duration<typename common_type<Rep1, Rep2>::type, Period>
>::type
operator*(const Rep1& s, const duration<Rep2, Period>& d)
{
return d * s;
}
// Duration /
template <class Rep1, class Period, class Rep2>
inline BOOST_CONSTEXPR
typename boost::disable_if <boost::chrono::detail::is_duration<Rep2>,
typename boost::chrono::detail::duration_divide_result<
duration<Rep1, Period>, Rep2>::type
>::type
operator/(const duration<Rep1, Period>& d, const Rep2& s)
{
typedef typename common_type<Rep1, Rep2>::type common_rep;
typedef duration<common_rep, Period> common_duration;
return common_duration(common_duration(d).count()/static_cast<common_rep>(s));
}
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
typename common_type<Rep1, Rep2>::type
operator/(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs)
{
typedef typename common_type<duration<Rep1, Period1>,
duration<Rep2, Period2> >::type common_duration;
return common_duration(lhs).count() / common_duration(rhs).count();
}
#ifdef BOOST_CHRONO_EXTENSIONS
template <class Rep1, class Rep2, class Period>
inline BOOST_CONSTEXPR
typename boost::disable_if <boost::chrono::detail::is_duration<Rep1>,
typename boost::chrono::detail::duration_divide_result2<
Rep1, duration<Rep2, Period> >::type
>::type
operator/(const Rep1& s, const duration<Rep2, Period>& d)
{
typedef typename common_type<Rep1, Rep2>::type common_rep;
typedef duration<common_rep, Period> common_duration;
return static_cast<common_rep>(s)/common_duration(d).count();
}
#endif
// Duration %
template <class Rep1, class Period, class Rep2>
inline BOOST_CONSTEXPR
typename boost::disable_if <boost::chrono::detail::is_duration<Rep2>,
typename boost::chrono::detail::duration_modulo_result<
duration<Rep1, Period>, Rep2>::type
>::type
operator%(const duration<Rep1, Period>& d, const Rep2& s)
{
typedef typename common_type<Rep1, Rep2>::type common_rep;
typedef duration<common_rep, Period> common_duration;
return common_duration(common_duration(d).count()%static_cast<common_rep>(s));
}
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
operator%(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs) {
typedef typename common_type<duration<Rep1, Period1>,
duration<Rep2, Period2> >::type common_duration;
return common_duration(common_duration(lhs).count()%common_duration(rhs).count());
}
//----------------------------------------------------------------------------//
// 20.9.3.6 duration comparisons [time.duration.comparisons] //
//----------------------------------------------------------------------------//
namespace detail
{
template <class LhsDuration, class RhsDuration>
struct duration_eq
{
BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) const
{
typedef typename common_type<LhsDuration, RhsDuration>::type common_duration;
return common_duration(lhs).count() == common_duration(rhs).count();
}
};
template <class LhsDuration>
struct duration_eq<LhsDuration, LhsDuration>
{
BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) const
{
return lhs.count() == rhs.count();
}
};
template <class LhsDuration, class RhsDuration>
struct duration_lt
{
BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) const
{
typedef typename common_type<LhsDuration, RhsDuration>::type common_duration;
return common_duration(lhs).count() < common_duration(rhs).count();
}
};
template <class LhsDuration>
struct duration_lt<LhsDuration, LhsDuration>
{
BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) const
{
return lhs.count() < rhs.count();
}
};
} // namespace detail
// Duration ==
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
bool
operator==(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs)
{
return boost::chrono::detail::duration_eq<
duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, rhs);
}
// Duration !=
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
bool
operator!=(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs)
{
return !(lhs == rhs);
}
// Duration <
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
bool
operator< (const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs)
{
return boost::chrono::detail::duration_lt<
duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, rhs);
}
// Duration >
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
bool
operator> (const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs)
{
return rhs < lhs;
}
// Duration <=
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
bool
operator<=(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs)
{
return !(rhs < lhs);
}
// Duration >=
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
bool
operator>=(const duration<Rep1, Period1>& lhs,
const duration<Rep2, Period2>& rhs)
{
return !(lhs < rhs);
}
//----------------------------------------------------------------------------//
// 20.9.3.7 duration_cast [time.duration.cast] //
//----------------------------------------------------------------------------//
// Compile-time select the most efficient algorithm for the conversion...
template <class ToDuration, class Rep, class Period>
inline BOOST_CONSTEXPR
typename boost::enable_if <
boost::chrono::detail::is_duration<ToDuration>, ToDuration>::type
duration_cast(const duration<Rep, Period>& fd)
{
return boost::chrono::detail::duration_cast<
duration<Rep, Period>, ToDuration>()(fd);
}
} // namespace chrono
} // namespace boost
#ifndef BOOST_CHRONO_HEADER_ONLY
// the suffix header occurs after all of our code:
#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
#endif
#endif // BOOST_CHRONO_DURATION_HPP

View File

@@ -0,0 +1,36 @@
// boost/chrono/round.hpp ------------------------------------------------------------//
// (C) Copyright Howard Hinnant
// Copyright 2011 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/chrono for documentation.
#ifndef BOOST_CHRONO_FLOOR_HPP
#define BOOST_CHRONO_FLOOR_HPP
#include <boost/chrono/duration.hpp>
namespace boost
{
namespace chrono
{
/**
* rounds down
*/
template <class To, class Rep, class Period>
To floor(const duration<Rep, Period>& d)
{
To t = duration_cast<To>(d);
if (t>d) --t;
return t;
}
} // namespace chrono
} // namespace boost
#endif

View File

@@ -0,0 +1,23 @@
// include
//
// (C) Copyright 2011 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
// This code was adapted by Vicente from Howard Hinnant's experimental work
// on chrono i/o under lvm/libc++ to Boost
#ifndef BOOST_CHRONO_INCLUDE_HPP
#define BOOST_CHRONO_INCLUDE_HPP
#include <boost/chrono/chrono.hpp>
#include <boost/chrono/chrono_io.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
#include <boost/chrono/thread_clock.hpp>
#include <boost/chrono/ceil.hpp>
#include <boost/chrono/floor.hpp>
#include <boost/chrono/round.hpp>
#endif // BOOST_CHRONO_INCLUDE_HPP

View File

@@ -0,0 +1,591 @@
// (C) Copyright Howard Hinnant
// (C) Copyright 2011 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
#ifndef BOOST_CHRONO_IO_DURATION_GET_HPP
#define BOOST_CHRONO_IO_DURATION_GET_HPP
#include <boost/chrono/config.hpp>
#include <string>
#include <boost/type_traits/is_scalar.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_signed.hpp>
#include <boost/mpl/if.hpp>
#include <boost/integer/common_factor_rt.hpp>
#include <boost/chrono/detail/scan_keyword.hpp>
#include <boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
#include <boost/assert.hpp>
#include <locale>
/**
* Duration formatting facet for input.
*/
namespace boost
{
namespace chrono
{
namespace detail
{
template <class Rep, bool = is_scalar<Rep>::value>
struct duration_io_intermediate
{
typedef Rep type;
};
template <class Rep>
struct duration_io_intermediate<Rep, true>
{
typedef typename mpl::if_c<is_floating_point<Rep>::value, long double, typename mpl::if_c<
is_signed<Rep>::value, long long, unsigned long long>::type>::type type;
};
template <class Rep>
struct duration_io_intermediate<process_times<Rep>, false>
{
typedef process_times<typename duration_io_intermediate<Rep>::type> type;
};
template <typename intermediate_type>
typename enable_if<is_integral<intermediate_type> , bool>::type reduce(intermediate_type& r,
unsigned long long& den, std::ios_base::iostate& err)
{
typedef typename common_type<intermediate_type, unsigned long long>::type common_type_t;
// Reduce r * num / den
common_type_t t = integer::gcd<common_type_t>(common_type_t(r), common_type_t(den));
r /= t;
den /= t;
if (den != 1)
{
// Conversion to Period is integral and not exact
err |= std::ios_base::failbit;
return false;
}
return true;
}
template <typename intermediate_type>
typename disable_if<is_integral<intermediate_type> , bool>::type reduce(intermediate_type&, unsigned long long&,
std::ios_base::iostate&)
{
return true;
}
}
/**
* @c duration_get is used to parse a character sequence, extracting
* components of a duration into a class duration.
* Each get member parses a format as produced by a corresponding format specifier to time_put<>::put.
* If the sequence being parsed matches the correct format, the
* corresponding member of the class duration argument are set to the
* value used to produce the sequence;
* otherwise either an error is reported or unspecified values are assigned.
* In other words, user confirmation is required for reliable parsing of
* user-entered durations, but machine-generated formats can be parsed
* reliably. This allows parsers to be aggressive about interpreting user
* variations on standard formats.
*
* If the end iterator is reached during parsing of the get() member
* function, the member sets std::ios_base::eofbit in err.
*/
template <class CharT, class InputIterator = std::istreambuf_iterator<CharT> >
class duration_get: public std::locale::facet
{
public:
/**
* Type of character the facet is instantiated on.
*/
typedef CharT char_type;
/**
* Type of character string passed to member functions.
*/
typedef std::basic_string<CharT> string_type;
/**
* Type of iterator used to scan the character buffer.
*/
typedef InputIterator iter_type;
/**
* Construct a @c duration_get facet.
* @param refs
* @Effects Construct a @c duration_get facet.
* If the @c refs argument is @c 0 then destruction of the object is
* delegated to the @c locale, or locales, containing it. This allows
* the user to ignore lifetime management issues. On the other had,
* if @c refs is @c 1 then the object must be explicitly deleted;
* the @c locale will not do so. In this case, the object can be
* maintained across the lifetime of multiple locales.
*/
explicit duration_get(size_t refs = 0) :
std::locale::facet(refs)
{
}
/**
* @param s start input stream iterator
* @param end end input stream iterator
* @param ios a reference to a ios_base
* @param err the ios_base state
* @param d the duration
* @param pattern begin of the formatting pattern
* @param pat_end end of the formatting pattern
*
* Requires: [pattern,pat_end) shall be a valid range.
*
* Effects: The function starts by evaluating err = std::ios_base::goodbit.
* It then enters a loop, reading zero or more characters from s at
* each iteration. Unless otherwise specified below, the loop
* terminates when the first of the following conditions holds:
* - The expression pattern == pat_end evaluates to true.
* - The expression err == std::ios_base::goodbit evaluates to false.
* - The expression s == end evaluates to true, in which case the
* function evaluates err = std::ios_base::eofbit | std::ios_base::failbit.
* - The next element of pattern is equal to '%', followed by a conversion
* specifier character, format.
* If the number of elements in the range [pattern,pat_end) is not
* sufficient to unambiguously determine whether the conversion
* specification is complete and valid, the function evaluates
* err = std::ios_base::failbit. Otherwise, the function evaluates
* s = get_value(s, end, ios, err, r) when the conversion specification is 'v' and
* s = get_value(s, end, ios, err, rt) when the conversion specification is 'u'.
* If err == std::ios_base::goodbit holds after
* the evaluation of the expression, the function increments pattern to
* point just past the end of the conversion specification and continues
* looping.
* - The expression isspace(*pattern, ios.getloc()) evaluates to true, in
* which case the function first increments pattern until
* pattern == pat_end || !isspace(*pattern, ios.getloc()) evaluates to true,
* then advances s until s == end || !isspace(*s, ios.getloc()) is true,
* and finally resumes looping.
* - The next character read from s matches the element pointed to by
* pattern in a case-insensitive comparison, in which case the function
* evaluates ++pattern, ++s and continues looping. Otherwise, the function
* evaluates err = std::ios_base::failbit.
*
* Once r and rt are retrieved,
* Returns: s
*/
template <typename Rep, typename Period>
iter_type get(iter_type s, iter_type end, std::ios_base& ios, std::ios_base::iostate& err,
duration<Rep, Period> &d, const char_type *pattern, const char_type *pat_end) const
{
if (std::has_facet<duration_units<CharT> >(ios.getloc()))
{
duration_units<CharT> const&facet = std::use_facet<duration_units<CharT> >(ios.getloc());
return get(facet, s, end, ios, err, d, pattern, pat_end);
}
else
{
duration_units_default<CharT> facet;
return get(facet, s, end, ios, err, d, pattern, pat_end);
}
}
template <typename Rep, typename Period>
iter_type get(duration_units<CharT> const&facet, iter_type s, iter_type end, std::ios_base& ios,
std::ios_base::iostate& err, duration<Rep, Period> &d, const char_type *pattern, const char_type *pat_end) const
{
typedef typename detail::duration_io_intermediate<Rep>::type intermediate_type;
intermediate_type r;
rt_ratio rt;
bool value_found = false, unit_found = false;
const std::ctype<char_type>& ct = std::use_facet<std::ctype<char_type> >(ios.getloc());
while (pattern != pat_end && err == std::ios_base::goodbit)
{
if (s == end)
{
err |= std::ios_base::eofbit;
break;
}
if (ct.narrow(*pattern, 0) == '%')
{
if (++pattern == pat_end)
{
err |= std::ios_base::failbit;
return s;
}
char cmd = ct.narrow(*pattern, 0);
switch (cmd)
{
case 'v':
{
if (value_found)
{
err |= std::ios_base::failbit;
return s;
}
value_found = true;
s = get_value(s, end, ios, err, r);
if (err & (std::ios_base::badbit | std::ios_base::failbit))
{
return s;
}
break;
}
case 'u':
{
if (unit_found)
{
err |= std::ios_base::failbit;
return s;
}
unit_found = true;
s = get_unit(facet, s, end, ios, err, rt);
if (err & (std::ios_base::badbit | std::ios_base::failbit))
{
return s;
}
break;
}
default:
BOOST_ASSERT(false && "Boost::Chrono internal error.");
break;
}
++pattern;
}
else if (ct.is(std::ctype_base::space, *pattern))
{
for (++pattern; pattern != pat_end && ct.is(std::ctype_base::space, *pattern); ++pattern)
;
for (; s != end && ct.is(std::ctype_base::space, *s); ++s)
;
}
else if (ct.toupper(*s) == ct.toupper(*pattern))
{
++s;
++pattern;
}
else
{
err |= std::ios_base::failbit;
return s;
}
}
unsigned long long num = rt.num;
unsigned long long den = rt.den;
// r should be multiplied by (num/den) / Period
// Reduce (num/den) / Period to lowest terms
unsigned long long gcd_n1_n2 = integer::gcd<unsigned long long>(num, Period::num);
unsigned long long gcd_d1_d2 = integer::gcd<unsigned long long>(den, Period::den);
num /= gcd_n1_n2;
den /= gcd_d1_d2;
unsigned long long n2 = Period::num / gcd_n1_n2;
unsigned long long d2 = Period::den / gcd_d1_d2;
if (num > (std::numeric_limits<unsigned long long>::max)() / d2 || den
> (std::numeric_limits<unsigned long long>::max)() / n2)
{
// (num/den) / Period overflows
err |= std::ios_base::failbit;
return s;
}
num *= d2;
den *= n2;
typedef typename common_type<intermediate_type, unsigned long long>::type common_type_t;
// num / den is now factor to multiply by r
if (!detail::reduce(r, den, err)) return s;
if (chrono::detail::gt(r, ( (duration_values<common_type_t>::max)() / num)))
{
// Conversion to Period overflowed
err |= std::ios_base::failbit;
return s;
}
common_type_t t = r * num;
t /= den;
if (t > duration_values<common_type_t>::zero())
{
if ( (duration_values<Rep>::max)() < Rep(t))
{
// Conversion to Period overflowed
err |= std::ios_base::failbit;
return s;
}
}
// Success! Store it.
d = duration<Rep, Period> (Rep(t));
return s;
}
/**
*
* @param s start input stream iterator
* @param end end input stream iterator
* @param ios a reference to a ios_base
* @param err the ios_base state
* @param d the duration
* Stores the duration pattern from the @c duration_unit facet in let say @c str. Last as if
* @code
* return get(s, end, ios, err, ios, d, str.data(), str.data() + str.size());
* @codeend
* @Returns An iterator pointing just beyond the last character that can be determined to be part of a valid name
*/
template <typename Rep, typename Period>
iter_type get(iter_type s, iter_type end, std::ios_base& ios, std::ios_base::iostate& err,
duration<Rep, Period> & d) const
{
if (std::has_facet<duration_units<CharT> >(ios.getloc()))
{
duration_units<CharT> const&facet = std::use_facet<duration_units<CharT> >(ios.getloc());
std::basic_string<CharT> str = facet.get_pattern();
return get(facet, s, end, ios, err, d, str.data(), str.data() + str.size());
}
else
{
duration_units_default<CharT> facet;
std::basic_string<CharT> str = facet.get_pattern();
return get(facet, s, end, ios, err, d, str.data(), str.data() + str.size());
}
}
/**
*
* @param s start input stream iterator
* @param end end input stream iterator
* @param ios a reference to a ios_base
* @param err the ios_base state
* @param r a reference to the duration representation.
* @Effects As if
* @code
* return std::use_facet<std::num_get<cahr_type, iter_type> >(ios.getloc()).get(s, end, ios, err, r);
* @endcode
*
* @Returns An iterator pointing just beyond the last character that can be determined to be part of a valid name
*/
template <typename Rep>
iter_type get_value(iter_type s, iter_type end, std::ios_base& ios, std::ios_base::iostate& err, Rep& r) const
{
return std::use_facet<std::num_get<CharT, iter_type> >(ios.getloc()).get(s, end, ios, err, r);
}
template <typename Rep>
iter_type get_value(iter_type s, iter_type end, std::ios_base& ios, std::ios_base::iostate& err, process_times<Rep>& r) const
{
if (s == end) {
err |= std::ios_base::eofbit;
return s;
} else if (*s != '{') { // mandatory '{'
err |= std::ios_base::failbit;
return s;
}
++s;
s = std::use_facet<std::num_get<CharT, iter_type> >(ios.getloc()).get(s, end, ios, err, r.real);
if (s == end) {
err |= std::ios_base::eofbit;
return s;
} else if (*s != ';') { // mandatory ';'
err |= std::ios_base::failbit;
return s;
}
++s;
s = std::use_facet<std::num_get<CharT, iter_type> >(ios.getloc()).get(s, end, ios, err, r.user);
if (s == end) {
err |= std::ios_base::eofbit;
return s;
} else if (*s != ';') { // mandatory ';'
err |= std::ios_base::failbit;
return s;
}
++s;
s = std::use_facet<std::num_get<CharT, iter_type> >(ios.getloc()).get(s, end, ios, err, r.system);
if (s == end) {
err |= std::ios_base::eofbit;
return s;
} else if (*s != '}') { // mandatory '}'
err |= std::ios_base::failbit;
return s;
}
return s;
}
/**
*
* @param s start input stream iterator
* @param e end input stream iterator
* @param ios a reference to a ios_base
* @param err the ios_base state
* @param rt a reference to the duration run-time ratio.
* @Returns An iterator pointing just beyond the last character that can be determined to be part of a valid name
*/
iter_type get_unit(iter_type i, iter_type e, std::ios_base& is, std::ios_base::iostate& err, rt_ratio &rt) const
{
if (std::has_facet<duration_units<CharT> >(is.getloc()))
{
return get_unit(std::use_facet<duration_units<CharT> >(is.getloc()), i, e, is, err, rt);
}
else
{
duration_units_default<CharT> facet;
return get_unit(facet, i, e, is, err, rt);
}
}
iter_type get_unit(duration_units<CharT> const &facet, iter_type i, iter_type e, std::ios_base& is,
std::ios_base::iostate& err, rt_ratio &rt) const
{
if (*i == '[')
{
// parse [N/D]s or [N/D]second or [N/D]seconds format
++i;
i = std::use_facet<std::num_get<CharT, iter_type> >(is.getloc()).get(i, e, is, err, rt.num);
if ( (err & std::ios_base::failbit) != 0)
{
return i;
}
if (i == e)
{
err |= std::ios_base::failbit;
return i;
}
CharT x = *i++;
if (x != '/')
{
err |= std::ios_base::failbit;
return i;
}
i = std::use_facet<std::num_get<CharT, iter_type> >(is.getloc()).get(i, e, is, err, rt.den);
if ( (err & std::ios_base::failbit) != 0)
{
return i;
}
if (i == e)
{
err |= std::ios_base::failbit;
return i;
}
if (*i != ']')
{
err |= std::ios_base::failbit;
return i;
}
++i;
if (i == e)
{
err |= std::ios_base::failbit;
return i;
}
// parse s or second or seconds
return do_get_n_d_valid_unit(facet, i, e, is, err);
}
else
{
return do_get_valid_unit(facet, i, e, is, err, rt);
}
}
/**
* Unique identifier for this type of facet.
*/
static std::locale::id id;
/**
* @Effects Destroy the facet
*/
~duration_get()
{
}
protected:
/**
* Extracts the run-time ratio associated to the duration when it is given in prefix form.
*
* This is an extension point of this facet so that we can take in account other periods that can have a useful
* translation in other contexts, as e.g. days and weeks.
*
* @param facet the duration_units facet
* @param i start input stream iterator.
* @param e end input stream iterator.
* @param ios a reference to a ios_base.
* @param err the ios_base state.
* @return @c s
*/
iter_type do_get_n_d_valid_unit(duration_units<CharT> const &facet, iter_type i, iter_type e,
std::ios_base&, std::ios_base::iostate& err) const
{
// parse SI name, short or long
const string_type* units = facet.get_n_d_valid_units_start();
const string_type* units_end = facet.get_n_d_valid_units_end();
const string_type* k = chrono_detail::scan_keyword(i, e, units, units_end,
//~ std::use_facet<std::ctype<CharT> >(loc),
err);
if (err & (std::ios_base::badbit | std::ios_base::failbit))
{
return i;
}
if (!facet.match_n_d_valid_unit(k))
{
err |= std::ios_base::failbit;
}
return i;
}
/**
* Extracts the run-time ratio associated to the duration when it is given in prefix form.
*
* This is an extension point of this facet so that we can take in account other periods that can have a useful
* translation in other contexts, as e.g. days and weeks.
*
* @param facet the duration_units facet
* @param i start input stream iterator.
* @param e end input stream iterator.
* @param ios a reference to a ios_base.
* @param err the ios_base state.
* @param rt a reference to the duration run-time ratio.
* @Effects
* @Returns An iterator pointing just beyond the last character that can be determined to be part of a valid name.
*/
iter_type do_get_valid_unit(duration_units<CharT> const &facet, iter_type i, iter_type e,
std::ios_base&, std::ios_base::iostate& err, rt_ratio &rt) const
{
// parse SI name, short or long
const string_type* units = facet.get_valid_units_start();
const string_type* units_end = facet.get_valid_units_end();
err = std::ios_base::goodbit;
const string_type* k = chrono_detail::scan_keyword(i, e, units, units_end,
//~ std::use_facet<std::ctype<CharT> >(loc),
err);
if (err & (std::ios_base::badbit | std::ios_base::failbit))
{
return i;
}
if (!facet.match_valid_unit(k, rt))
{
err |= std::ios_base::failbit;
}
return i;
}
};
/**
* Unique identifier for this type of facet.
*/
template <class CharT, class InputIterator>
std::locale::id duration_get<CharT, InputIterator>::id;
} // chrono
}
// boost
#endif // header

View File

@@ -0,0 +1,295 @@
// (C) Copyright Howard Hinnant
// (C) Copyright 2011 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
// This code was adapted by Vicente from Howard Hinnant's experimental work
// on chrono i/o to Boost
#ifndef BOOST_CHRONO_IO_DURATION_IO_HPP
#define BOOST_CHRONO_IO_DURATION_IO_HPP
#include <boost/chrono/duration.hpp>
#include <boost/ratio/ratio_io.hpp>
#include <boost/chrono/io/duration_style.hpp>
#include <boost/chrono/io/ios_base_state.hpp>
#include <boost/chrono/io/duration_put.hpp>
#include <boost/chrono/io/duration_get.hpp>
#include <boost/chrono/io/utility/manip_base.hpp>
#include <boost/core/no_exceptions_support.hpp>
#include <boost/type_traits/is_integral.hpp>
#include <boost/type_traits/is_floating_point.hpp>
#include <locale>
#include <iosfwd>
#include <sstream>
namespace boost
{
namespace chrono
{
/**
* duration parameterized manipulator.
*/
class duration_fmt: public manip<duration_fmt>
{
duration_style style_;
public:
/**
* explicit manipulator constructor from a @c duration_style
*/
explicit duration_fmt(duration_style style)BOOST_NOEXCEPT
: style_(style)
{}
/**
* Change the duration_style ios state;
*/
void operator()(std::ios_base &ios) const
{
set_duration_style(ios, style_);
}
};
/**
* duration_style i/o saver.
*
* See Boost.IO i/o state savers for a motivating compression.
*/
struct duration_style_io_saver
{
//! the type of the state to restore
typedef std::ios_base state_type;
//! the type of aspect to save
typedef duration_style aspect_type;
/**
* Explicit construction from an i/o stream.
*
* Store a reference to the i/o stream and the value of the associated @c duration_style.
*/
explicit duration_style_io_saver(state_type &s) :
s_save_(s), a_save_(get_duration_style(s))
{
}
/**
* Construction from an i/o stream and a @c duration_style to restore.
*
* Stores a reference to the i/o stream and the value @c new_value @c duration_style to set.
*/
duration_style_io_saver(state_type &s, aspect_type new_value) :
s_save_(s), a_save_(get_duration_style(s))
{
set_duration_style(s, new_value);
}
/**
* Destructor.
*
* Restores the i/o stream with the duration_style to be restored.
*/
~duration_style_io_saver()
{
this->restore();
}
/**
* Restores the i/o stream with the duration_style to be restored.
*/
void restore()
{
set_duration_style(s_save_, a_save_);
}
private:
duration_style_io_saver& operator=(duration_style_io_saver const& rhs) ;
state_type& s_save_;
aspect_type a_save_;
};
template <class Rep>
struct duration_put_enabled
: integral_constant<bool,
is_integral<Rep>::value || is_floating_point<Rep>::value
>
{};
/**
* duration stream inserter
* @param os the output stream
* @param d to value to insert
* @return @c os
*/
template <class CharT, class Traits, class Rep, class Period>
typename boost::enable_if_c< ! duration_put_enabled<Rep>::value, std::basic_ostream<CharT, Traits>& >::type
operator<<(std::basic_ostream<CharT, Traits>& os, const duration<Rep, Period>& d)
{
std::basic_ostringstream<CharT, Traits> ostr;
ostr << d.count();
duration<int, Period> dd(0);
bool failed = false;
BOOST_TRY
{
std::ios_base::iostate err = std::ios_base::goodbit;
BOOST_TRY
{
typename std::basic_ostream<CharT, Traits>::sentry opfx(os);
if (bool(opfx))
{
if (!std::has_facet<duration_put<CharT> >(os.getloc()))
{
if (duration_put<CharT> ().put(os, os, os.fill(), dd, ostr.str().c_str()) .failed())
{
err = std::ios_base::badbit;
}
}
else if (std::use_facet<duration_put<CharT> >(os.getloc()) .put(os, os, os.fill(), dd, ostr.str().c_str()) .failed())
{
err = std::ios_base::badbit;
}
os.width(0);
}
}
BOOST_CATCH(...)
{
bool flag = false;
BOOST_TRY
{
os.setstate(std::ios_base::failbit);
}
BOOST_CATCH (std::ios_base::failure )
{
flag = true;
}
BOOST_CATCH_END
if (flag) throw;
}
BOOST_CATCH_END
if (err) os.setstate(err);
return os;
}
BOOST_CATCH(...)
{
failed = true;
}
BOOST_CATCH_END
if (failed) os.setstate(std::ios_base::failbit | std::ios_base::badbit);
return os;
}
template <class CharT, class Traits, class Rep, class Period>
typename boost::enable_if_c< duration_put_enabled<Rep>::value, std::basic_ostream<CharT, Traits>& >::type
operator<<(std::basic_ostream<CharT, Traits>& os, const duration<Rep, Period>& d)
{
bool failed = false;
BOOST_TRY
{
std::ios_base::iostate err = std::ios_base::goodbit;
BOOST_TRY
{
typename std::basic_ostream<CharT, Traits>::sentry opfx(os);
if (bool(opfx))
{
if (!std::has_facet<duration_put<CharT> >(os.getloc()))
{
if (duration_put<CharT> ().put(os, os, os.fill(), d) .failed())
{
err = std::ios_base::badbit;
}
}
else if (std::use_facet<duration_put<CharT> >(os.getloc()) .put(os, os, os.fill(), d) .failed())
{
err = std::ios_base::badbit;
}
os.width(0);
}
}
BOOST_CATCH(...)
{
bool flag = false;
BOOST_TRY
{
os.setstate(std::ios_base::failbit);
}
BOOST_CATCH (std::ios_base::failure )
{
flag = true;
}
BOOST_CATCH_END
if (flag) throw;
}
BOOST_CATCH_END
if (err) os.setstate(err);
return os;
}
BOOST_CATCH(...)
{
failed = true;
}
BOOST_CATCH_END
if (failed) os.setstate(std::ios_base::failbit | std::ios_base::badbit);
return os;
}
/**
*
* @param is the input stream
* @param d the duration
* @return @c is
*/
template <class CharT, class Traits, class Rep, class Period>
std::basic_istream<CharT, Traits>&
operator>>(std::basic_istream<CharT, Traits>& is, duration<Rep, Period>& d)
{
std::ios_base::iostate err = std::ios_base::goodbit;
BOOST_TRY
{
typename std::basic_istream<CharT, Traits>::sentry ipfx(is);
if (bool(ipfx))
{
if (!std::has_facet<duration_get<CharT> >(is.getloc()))
{
duration_get<CharT> ().get(is, std::istreambuf_iterator<CharT, Traits>(), is, err, d);
}
else
{
std::use_facet<duration_get<CharT> >(is.getloc()) .get(is, std::istreambuf_iterator<CharT, Traits>(), is,
err, d);
}
}
}
BOOST_CATCH (...)
{
bool flag = false;
BOOST_TRY
{
is.setstate(std::ios_base::failbit);
}
BOOST_CATCH (std::ios_base::failure )
{
flag = true;
}
BOOST_CATCH_END
if (flag) { BOOST_RETHROW }
}
BOOST_CATCH_END
if (err) is.setstate(err);
return is;
}
} // chrono
}
#endif // header

View File

@@ -0,0 +1,317 @@
// (C) Copyright Howard Hinnant
// (C) Copyright 2011 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
/**
* Duration formatting facet for output.
*/
#ifndef BOOST_CHRONO_IO_DURATION_PUT_HPP
#define BOOST_CHRONO_IO_DURATION_PUT_HPP
#include <boost/chrono/config.hpp>
#include <boost/chrono/io/duration_units.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
#include <boost/assert.hpp>
#include <locale>
namespace boost
{
namespace chrono
{
namespace detail
{
template <class T>
struct propagate {
typedef T type;
};
template <>
struct propagate<boost::int_least32_t> {
typedef boost::int_least64_t type;
};
}
/**
* @tparam ChatT a character type
* @tparam OutputIterator a model of @c OutputIterator
*
* The @c duration_put facet provides facilities for formatted output of duration values.
* The member function of @c duration_put take a duration and format it into character string representation.
*
*/
template <class CharT, class OutputIterator = std::ostreambuf_iterator<CharT> >
class duration_put: public std::locale::facet
{
public:
/**
* Type of character the facet is instantiated on.
*/
typedef CharT char_type;
/**
* Type of character string passed to member functions.
*/
typedef std::basic_string<CharT> string_type;
/**
* Type of iterator used to write in the character buffer.
*/
typedef OutputIterator iter_type;
/**
* Construct a duration_put facet.
* @param refs
* @Effects Construct a duration_put facet.
* If the @c refs argument is @c 0 then destruction of the object is
* delegated to the @c locale, or locales, containing it. This allows
* the user to ignore lifetime management issues. On the other had,
* if @c refs is @c 1 then the object must be explicitly deleted;
* the @c locale will not do so. In this case, the object can be
* maintained across the lifetime of multiple locales.
*/
explicit duration_put(size_t refs = 0) :
std::locale::facet(refs)
{
}
/**
*
* @param s an output stream iterator
* @param ios a reference to a ios_base
* @param fill the character used as filler
* @param d the duration
* @param pattern begin of the formatting pattern
* @param pat_end end of the formatting pattern
*
* @Effects Steps through the sequence from @c pattern to @c pat_end,
* identifying characters that are part of a pattern sequence. Each character
* that is not part of a pattern sequence is written to @c s immediately, and
* each pattern sequence, as it is identified, results in a call to
* @c put_value or @c put_unit;
* thus, pattern elements and other characters are interleaved in the output
* in the order in which they appear in the pattern. Pattern sequences are
* identified by converting each character @c c to a @c char value as if by
* @c ct.narrow(c,0), where @c ct is a reference to @c ctype<charT> obtained from
* @c ios.getloc(). The first character of each sequence is equal to @c '%',
* followed by a pattern specifier character @c spec, which can be @c 'v' for
* the duration value or @c 'u' for the duration unit. .
* For each valid pattern sequence identified, calls
* <c>put_value(s, ios, fill, d)</c> or <c>put_unit(s, ios, fill, d)</c>.
*
* @Returns An iterator pointing immediately after the last character produced.
*/
template <typename Rep, typename Period>
iter_type put(iter_type s, std::ios_base& ios, char_type fill, duration<Rep, Period> const& d, const CharT* pattern,
const CharT* pat_end, const char_type* val = 0) const
{
if (std::has_facet<duration_units<CharT> >(ios.getloc()))
{
duration_units<CharT> const&facet = std::use_facet<duration_units<CharT> >(
ios.getloc());
return put(facet, s, ios, fill, d, pattern, pat_end, val);
}
else
{
duration_units_default<CharT> facet;
return put(facet, s, ios, fill, d, pattern, pat_end, val);
}
}
template <typename Rep, typename Period>
iter_type put(duration_units<CharT> const& units_facet, iter_type s, std::ios_base& ios, char_type fill,
duration<Rep, Period> const& d, const CharT* pattern, const CharT* pat_end, const char_type* val = 0) const
{
const std::ctype<char_type>& ct = std::use_facet<std::ctype<char_type> >(ios.getloc());
for (; pattern != pat_end; ++pattern)
{
if (ct.narrow(*pattern, 0) == '%')
{
if (++pattern == pat_end)
{
*s++ = pattern[-1];
break;
}
char fmt = ct.narrow(*pattern, 0);
switch (fmt)
{
case 'v':
{
s = put_value(s, ios, fill, d, val);
break;
}
case 'u':
{
s = put_unit(units_facet, s, ios, fill, d);
break;
}
default:
BOOST_ASSERT(false && "Boost::Chrono internal error.");
break;
}
}
else
*s++ = *pattern;
}
return s;
}
/**
*
* @param s an output stream iterator
* @param ios a reference to a ios_base
* @param fill the character used as filler
* @param d the duration
* @Effects imbue in @c ios the @c duration_units_default facet if not already present.
* Retrieves Stores the duration pattern from the @c duration_unit facet in let say @c str. Last as if
* @code
* return put(s, ios, d, str.data(), str.data() + str.size());
* @endcode
* @Returns An iterator pointing immediately after the last character produced.
*/
template <typename Rep, typename Period>
iter_type put(iter_type s, std::ios_base& ios, char_type fill, duration<Rep, Period> const& d, const char_type* val = 0) const
{
if (std::has_facet<duration_units<CharT> >(ios.getloc()))
{
duration_units<CharT> const&facet = std::use_facet<duration_units<CharT> >(
ios.getloc());
std::basic_string<CharT> str = facet.get_pattern();
return put(facet, s, ios, fill, d, str.data(), str.data() + str.size(), val);
}
else
{
duration_units_default<CharT> facet;
std::basic_string<CharT> str = facet.get_pattern();
return put(facet, s, ios, fill, d, str.data(), str.data() + str.size(), val);
}
}
/**
*
* @param s an output stream iterator
* @param ios a reference to a ios_base
* @param fill the character used as filler
* @param d the duration
* @Effects As if s=std::use_facet<std::num_put<CharT, iter_type> >(ios.getloc()).put(s, ios, fill, static_cast<long int> (d.count())).
* @Returns s, iterator pointing immediately after the last character produced.
*/
template <typename Rep, typename Period>
iter_type put_value(iter_type s, std::ios_base& ios, char_type fill, duration<Rep, Period> const& d, const char_type* val = 0) const
{
if (val)
{
while (*val) {
*s = *val;
s++; val++;
}
return s;
}
return std::use_facet<std::num_put<CharT, iter_type> >(ios.getloc()).put(s, ios, fill,
static_cast<typename detail::propagate<Rep>::type> (d.count()));
}
template <typename Rep, typename Period>
iter_type put_value(iter_type s, std::ios_base& ios, char_type fill, duration<process_times<Rep>, Period> const& d, const char_type* = 0) const
{
*s++ = CharT('{');
s = put_value(s, ios, fill, process_real_cpu_clock::duration(d.count().real));
*s++ = CharT(';');
s = put_value(s, ios, fill, process_user_cpu_clock::duration(d.count().user));
*s++ = CharT(';');
s = put_value(s, ios, fill, process_system_cpu_clock::duration(d.count().system));
*s++ = CharT('}');
return s;
}
/**
*
* @param s an output stream iterator
* @param ios a reference to a ios_base
* @param fill the character used as filler
* @param d the duration
* @Effects Let facet be the duration_units<CharT> facet associated to ios. If the associated unit is named,
* as if
* @code
string_type str = facet.get_unit(get_duration_style(ios), d);
s=std::copy(str.begin(), str.end(), s);
* @endcode
* Otherwise, format the unit as "[Period::num/Period::den]" followed by the unit associated to [N/D] obtained using facet.get_n_d_unit(get_duration_style(ios), d)
* @Returns s, iterator pointing immediately after the last character produced.
*/
template <typename Rep, typename Period>
iter_type put_unit(iter_type s, std::ios_base& ios, char_type fill, duration<Rep, Period> const& d) const
{
if (std::has_facet<duration_units<CharT> >(ios.getloc()))
{
duration_units<CharT> const&facet = std::use_facet<duration_units<CharT> >(
ios.getloc());
return put_unit(facet, s, ios, fill, d);
}
else
{
duration_units_default<CharT> facet;
return put_unit(facet, s, ios, fill, d);
}
}
template <typename Rep, typename Period>
iter_type put_unit(duration_units<CharT> const& facet, iter_type s, std::ios_base& ios, char_type fill,
duration<Rep, Period> const& d) const
{
if (facet.template is_named_unit<Period>()) {
string_type str = facet.get_unit(get_duration_style(ios), d);
s=std::copy(str.begin(), str.end(), s);
} else {
*s++ = CharT('[');
std::use_facet<std::num_put<CharT, iter_type> >(ios.getloc()).put(s, ios, fill, Period::num);
*s++ = CharT('/');
std::use_facet<std::num_put<CharT, iter_type> >(ios.getloc()).put(s, ios, fill, Period::den);
*s++ = CharT(']');
string_type str = facet.get_n_d_unit(get_duration_style(ios), d);
s=std::copy(str.begin(), str.end(), s);
}
return s;
}
template <typename Rep, typename Period>
iter_type put_unit(duration_units<CharT> const& facet, iter_type s, std::ios_base& ios, char_type fill,
duration<process_times<Rep>, Period> const& d) const
{
duration<Rep,Period> real(d.count().real);
if (facet.template is_named_unit<Period>()) {
string_type str = facet.get_unit(get_duration_style(ios), real);
s=std::copy(str.begin(), str.end(), s);
} else {
*s++ = CharT('[');
std::use_facet<std::num_put<CharT, iter_type> >(ios.getloc()).put(s, ios, fill, Period::num);
*s++ = CharT('/');
std::use_facet<std::num_put<CharT, iter_type> >(ios.getloc()).put(s, ios, fill, Period::den);
*s++ = CharT(']');
string_type str = facet.get_n_d_unit(get_duration_style(ios), real);
s=std::copy(str.begin(), str.end(), s);
}
return s;
}
/**
* Unique identifier for this type of facet.
*/
static std::locale::id id;
/**
* @Effects Destroy the facet
*/
~duration_put()
{
}
};
template <class CharT, class OutputIterator>
std::locale::id duration_put<CharT, OutputIterator>::id;
} // chrono
} // boost
#endif // header

View File

@@ -0,0 +1,35 @@
// (C) Copyright Howard Hinnant
// (C) Copyright 2011 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
// This code was adapted by Vicente from Howard Hinnant's experimental work
// on chrono i/o to Boost
#ifndef BOOST_CHRONO_IO_DURATION_STYLE_HPP
#define BOOST_CHRONO_IO_DURATION_STYLE_HPP
#include <boost/core/scoped_enum.hpp>
namespace boost
{
namespace chrono
{
/**
* Scoped enumeration emulation stating whether the duration I/O style is long or short.
* prefix means duration::rep with whatever stream/locale settings are set for it followed by a long name representing the unit
* symbol means duration::rep with whatever stream/locale settings are set for it followed by a SI unit abbreviation
*/
BOOST_SCOPED_ENUM_DECLARE_BEGIN(duration_style)
{
prefix, symbol
}
BOOST_SCOPED_ENUM_DECLARE_END(duration_style)
} // chrono
}
#endif // header

View File

@@ -0,0 +1,152 @@
// (C) Copyright 2011 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
// This code was adapted by Vicente from Howard Hinnant's experimental work
// on chrono i/o to Boost
#ifndef BOOST_CHRONO_IO_IOS_BASE_STATE_HPP
#define BOOST_CHRONO_IO_IOS_BASE_STATE_HPP
#include <boost/chrono/config.hpp>
#include <locale>
#include <boost/chrono/io/duration_style.hpp>
#include <boost/chrono/io/timezone.hpp>
#include <boost/chrono/io/utility/ios_base_state_ptr.hpp>
namespace boost
{
namespace chrono
{
class fmt_masks : public ios_flags<fmt_masks>
{
typedef ios_flags<fmt_masks> base_type;
fmt_masks& operator=(fmt_masks const& rhs) ;
public:
fmt_masks(std::ios_base& ios): base_type(ios) {}
enum type
{
uses_symbol = 1 << 0,
uses_local = 1 << 1
};
inline duration_style get_duration_style()
{
return (flags() & uses_symbol) ? duration_style::symbol : duration_style::prefix;
}
inline void set_duration_style(duration_style style)
{
if (style == duration_style::symbol)
setf(uses_symbol);
else
unsetf(uses_symbol);
}
inline timezone get_timezone()
{
return (flags() & uses_local) ? timezone::local : timezone::utc;
}
inline void set_timezone(timezone tz)
{
if (tz == timezone::local)
setf(uses_local);
else
unsetf(uses_local);
}
};
namespace detail
{
namespace /**/ {
xalloc_key_initializer<fmt_masks > fmt_masks_xalloc_key_initializer;
} // namespace
} // namespace detail
inline duration_style get_duration_style(std::ios_base & ios)
{
return fmt_masks(ios).get_duration_style();
}
inline void set_duration_style(std::ios_base& ios, duration_style style)
{
fmt_masks(ios).set_duration_style(style);
}
inline std::ios_base& symbol_format(std::ios_base& ios)
{
fmt_masks(ios).setf(fmt_masks::uses_symbol);
return ios;
}
inline std::ios_base& name_format(std::ios_base& ios)
{
fmt_masks(ios).unsetf(fmt_masks::uses_symbol);
return ios;
}
inline timezone get_timezone(std::ios_base & ios)
{
return fmt_masks(ios).get_timezone();
}
inline void set_timezone(std::ios_base& ios, timezone tz)
{
fmt_masks(ios).set_timezone(tz);
}
inline std::ios_base& local_timezone(std::ios_base& ios)
{
fmt_masks(ios).setf(fmt_masks::uses_local);
return ios;
}
inline std::ios_base& utc_timezone(std::ios_base& ios)
{
fmt_masks(ios).unsetf(fmt_masks::uses_local);
return ios;
}
namespace detail
{
template<typename CharT>
struct ios_base_data_aux
{
std::basic_string<CharT> time_fmt;
std::basic_string<CharT> duration_fmt;
public:
ios_base_data_aux()
//:
// time_fmt(""),
// duration_fmt("")
{
}
};
template<typename CharT>
struct ios_base_data {};
namespace /**/ {
xalloc_key_initializer<detail::ios_base_data<char> > ios_base_data_aux_xalloc_key_initializer;
xalloc_key_initializer<detail::ios_base_data<wchar_t> > wios_base_data_aux_xalloc_key_initializer;
#if BOOST_CHRONO_HAS_UNICODE_SUPPORT
xalloc_key_initializer<detail::ios_base_data<char16_t> > u16ios_base_data_aux_xalloc_key_initializer;
xalloc_key_initializer<detail::ios_base_data<char32_t> > u32ios_base_data_aux_xalloc_key_initializer;
#endif
} // namespace
} // namespace detail
template<typename CharT>
inline std::basic_string<CharT> get_time_fmt(std::ios_base & ios)
{
ios_state_not_null_ptr<detail::ios_base_data<CharT>, detail::ios_base_data_aux<CharT> > ptr(ios);
return ptr->time_fmt;
}
template<typename CharT>
inline void set_time_fmt(std::ios_base& ios, std::basic_string<
CharT> const& fmt)
{
ios_state_not_null_ptr<detail::ios_base_data<CharT>, detail::ios_base_data_aux<CharT> > ptr(ios);
ptr->time_fmt = fmt;
}
} // chrono
} // boost
#endif // header

View File

@@ -0,0 +1,330 @@
// (C) Copyright Howard Hinnant
// (C) Copyright 2011 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
#ifndef BOOST_CHRONO_IO_TIME_POINT_GET_HPP
#define BOOST_CHRONO_IO_TIME_POINT_GET_HPP
#include <boost/chrono/config.hpp>
#include <boost/chrono/detail/scan_keyword.hpp>
#include <boost/chrono/io/time_point_units.hpp>
#include <boost/chrono/io/duration_get.hpp>
#include <boost/assert.hpp>
#include <locale>
#include <string>
/**
* Duration formatting facet for input.
*/
namespace boost
{
namespace chrono
{
template <class CharT, class InputIterator = std::istreambuf_iterator<CharT> >
class time_point_get: public std::locale::facet
{
public:
/**
* Type of character the facet is instantiated on.
*/
typedef CharT char_type;
/**
* Type of iterator used to scan the character buffer.
*/
typedef InputIterator iter_type;
/**
* Construct a @c time_point_get facet.
* @param refs
* @Effects Construct a @c time_point_get facet.
* If the @c refs argument is @c 0 then destruction of the object is
* delegated to the @c locale, or locales, containing it. This allows
* the user to ignore lifetime management issues. On the other had,
* if @c refs is @c 1 then the object must be explicitly deleted;
* the @c locale will not do so. In this case, the object can be
* maintained across the lifetime of multiple locales.
*/
explicit time_point_get(size_t refs = 0) :
std::locale::facet(refs)
{
}
/**
* @param s start input stream iterator
* @param end end input stream iterator
* @param ios a reference to a ios_base
* @param err the ios_base state
* @param d the duration
* @param pattern begin of the formatting pattern
* @param pat_end end of the formatting pattern
*
* Requires: [pattern,pat_end) shall be a valid range.
*
* Effects: The function starts by evaluating err = std::ios_base::goodbit.
* It then enters a loop, reading zero or more characters from s at
* each iteration. Unless otherwise specified below, the loop
* terminates when the first of the following conditions holds:
* - The expression pattern == pat_end evaluates to true.
* - The expression err == std::ios_base::goodbit evaluates to false.
* - The expression s == end evaluates to true, in which case the
* function evaluates err = std::ios_base::eofbit | std::ios_base::failbit.
* - The next element of pattern is equal to '%', followed by a conversion
* specifier character, the functions @c get_duration or @c get_epoch are called depending on
* whether the format is @c 'd' or @c 'e'.
* If the number of elements in the range [pattern,pat_end) is not
* sufficient to unambiguously determine whether the conversion
* specification is complete and valid, the function evaluates
* err = std::ios_base::failbit. Otherwise, the function evaluates
* s = do_get(s, end, ios, err, d). If err == std::ios_base::goodbit holds after
* the evaluation of the expression, the function increments pattern to
* point just past the end of the conversion specification and continues
* looping.
* - The expression isspace(*pattern, ios.getloc()) evaluates to true, in
* which case the function first increments pattern until
* pattern == pat_end || !isspace(*pattern, ios.getloc()) evaluates to true,
* then advances s until s == end || !isspace(*s, ios.getloc()) is true,
* and finally resumes looping.
* - The next character read from s matches the element pointed to by
* pattern in a case-insensitive comparison, in which case the function
* evaluates ++pattern, ++s and continues looping. Otherwise, the function
* evaluates err = std::ios_base::failbit.
*
* Returns: s
*/
template <class Clock, class Duration>
iter_type get(iter_type i, iter_type e, std::ios_base& is, std::ios_base::iostate& err,
time_point<Clock, Duration> &tp, const char_type *pattern, const char_type *pat_end) const
{
if (std::has_facet<time_point_units<CharT> >(is.getloc()))
{
time_point_units<CharT> const &facet = std::use_facet<time_point_units<CharT> >(is.getloc());
return get(facet, i, e, is, err, tp, pattern, pat_end);
}
else
{
time_point_units_default<CharT> facet;
return get(facet, i, e, is, err, tp, pattern, pat_end);
}
}
template <class Clock, class Duration>
iter_type get(time_point_units<CharT> const &facet, iter_type s, iter_type end, std::ios_base& ios,
std::ios_base::iostate& err, time_point<Clock, Duration> &tp, const char_type *pattern,
const char_type *pat_end) const
{
Duration d;
bool duration_found = false, epoch_found = false;
const std::ctype<char_type>& ct = std::use_facet<std::ctype<char_type> >(ios.getloc());
err = std::ios_base::goodbit;
while (pattern != pat_end && err == std::ios_base::goodbit)
{
if (s == end)
{
err |= std::ios_base::eofbit;
break;
}
if (ct.narrow(*pattern, 0) == '%')
{
if (++pattern == pat_end)
{
err |= std::ios_base::failbit;
return s;
}
char cmd = ct.narrow(*pattern, 0);
switch (cmd)
{
case 'd':
{
if (duration_found)
{
err |= std::ios_base::failbit;
return s;
}
duration_found = true;
s = get_duration(s, end, ios, err, d);
if (err & (std::ios_base::badbit | std::ios_base::failbit))
{
return s;
}
break;
}
case 'e':
{
if (epoch_found)
{
err |= std::ios_base::failbit;
return s;
}
epoch_found = true;
s = get_epoch<Clock> (facet, s, end, ios, err);
if (err & (std::ios_base::badbit | std::ios_base::failbit))
{
return s;
}
break;
}
default:
BOOST_ASSERT(false && "Boost::Chrono internal error.");
break;
}
++pattern;
}
else if (ct.is(std::ctype_base::space, *pattern))
{
for (++pattern; pattern != pat_end && ct.is(std::ctype_base::space, *pattern); ++pattern)
;
for (; s != end && ct.is(std::ctype_base::space, *s); ++s)
;
}
else if (ct.toupper(*s) == ct.toupper(*pattern))
{
++s;
++pattern;
}
else
{
err |= std::ios_base::failbit;
}
}
// Success! Store it.
tp = time_point<Clock, Duration> (d);
return s;
}
/**
*
* @param s an input stream iterator
* @param ios a reference to a ios_base
* @param d the duration
* Stores the duration pattern from the @c duration_unit facet in let say @c str. Last as if
* @code
* return get(s, end, ios, err, ios, d, str.data(), str.data() + str.size());
* @codeend
* @Returns An iterator pointing just beyond the last character that can be determined to be part of a valid name
*/
template <class Clock, class Duration>
iter_type get(iter_type i, iter_type e, std::ios_base& is, std::ios_base::iostate& err,
time_point<Clock, Duration> &tp) const
{
if (std::has_facet<time_point_units<CharT> >(is.getloc()))
{
time_point_units<CharT> const &facet = std::use_facet<time_point_units<CharT> >(is.getloc());
std::basic_string<CharT> str = facet.get_pattern();
return get(facet, i, e, is, err, tp, str.data(), str.data() + str.size());
}
else
{
time_point_units_default<CharT> facet;
std::basic_string<CharT> str = facet.get_pattern();
return get(facet, i, e, is, err, tp, str.data(), str.data() + str.size());
}
}
/**
* As if
* @code
* return facet.get(s, end, ios, err, d);
* @endcode
* where @c facet is either the @c duration_get facet associated to the @c ios or an instance of the default @c duration_get facet.
*
* @Returns An iterator pointing just beyond the last character that can be determined to be part of a valid duration.
*/
template <typename Rep, typename Period>
iter_type get_duration(iter_type i, iter_type e, std::ios_base& is, std::ios_base::iostate& err,
duration<Rep, Period>& d) const
{
if (std::has_facet<duration_get<CharT> >(is.getloc()))
{
duration_get<CharT> const &facet = std::use_facet<duration_get<CharT> >(is.getloc());
return get_duration(facet, i, e, is, err, d);
}
else
{
duration_get<CharT> facet;
return get_duration(facet, i, e, is, err, d);
}
}
template <typename Rep, typename Period>
iter_type get_duration(duration_get<CharT> const& facet, iter_type s, iter_type end, std::ios_base& ios,
std::ios_base::iostate& err, duration<Rep, Period>& d) const
{
return facet.get(s, end, ios, err, d);
}
/**
*
* @Effects Let @c facet be the @c time_point_units facet associated to @c is or a new instance of the default @c time_point_units_default facet.
* Let @c epoch be the epoch string associated to the Clock using this facet.
* Scans @c i to match @c epoch or @c e is reached.
*
* If not match before the @c e is reached @c std::ios_base::failbit is set in @c err.
* If @c e is reached @c std::ios_base::failbit is set in @c err.
*
* @Returns An iterator pointing just beyond the last character that can be determined to be part of a valid epoch.
*/
template <class Clock>
iter_type get_epoch(iter_type i, iter_type e, std::ios_base& is, std::ios_base::iostate& err) const
{
if (std::has_facet<time_point_units<CharT> >(is.getloc()))
{
time_point_units<CharT> const &facet = std::use_facet<time_point_units<CharT> >(is.getloc());
return get_epoch<Clock>(facet, i, e, is, err);
}
else
{
time_point_units_default<CharT> facet;
return get_epoch<Clock>(facet, i, e, is, err);
}
}
template <class Clock>
iter_type get_epoch(time_point_units<CharT> const &facet, iter_type i, iter_type e, std::ios_base&,
std::ios_base::iostate& err) const
{
const std::basic_string<CharT> epoch = facet.template get_epoch<Clock> ();
std::ptrdiff_t k = chrono_detail::scan_keyword(i, e, &epoch, &epoch + 1,
//~ std::use_facet<std::ctype<CharT> >(ios.getloc()),
err) - &epoch;
if (k == 1)
{
err |= std::ios_base::failbit;
return i;
}
return i;
}
/**
* Unique identifier for this type of facet.
*/
static std::locale::id id;
/**
* @Effects Destroy the facet
*/
~time_point_get()
{
}
};
/**
* Unique identifier for this type of facet.
*/
template <class CharT, class InputIterator>
std::locale::id time_point_get<CharT, InputIterator>::id;
} // chrono
}
// boost
#endif // header

View File

@@ -0,0 +1,261 @@
// (C) Copyright Howard Hinnant
// (C) Copyright 2011 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
/**
* Duration formatting facet for output.
*/
#ifndef BOOST_CHRONO_IO_TIME_POINT_PUT_HPP
#define BOOST_CHRONO_IO_TIME_POINT_PUT_HPP
#include <boost/chrono/config.hpp>
#include <boost/chrono/io/time_point_units.hpp>
#include <boost/chrono/io/duration_put.hpp>
#include <boost/assert.hpp>
#include <locale>
namespace boost
{
namespace chrono
{
/**
* @tparam ChatT a character type
* @tparam OutputIterator a model of @c OutputIterator
*
* The @c time_point_put facet provides facilities for formatted output of @c time_point values.
* The member function of @c time_point_put take a @c time_point and format it into character string representation.
*
*/
template <class CharT, class OutputIterator = std::ostreambuf_iterator<CharT> >
class time_point_put: public std::locale::facet
{
public:
/**
* Type of character the facet is instantiated on.
*/
typedef CharT char_type;
/**
* Type of character string passed to member functions.
*/
typedef std::basic_string<CharT> string_type;
/**
* Type of iterator used to write in the character buffer.
*/
typedef OutputIterator iter_type;
/**
* Construct a time_point_put facet.
* @param refs
* @Effects Construct a time_point_put facet.
* If the @c refs argument is @c 0 then destruction of the object is
* delegated to the @c locale, or locales, containing it. This allows
* the user to ignore lifetime management issues. On the other had,
* if @c refs is @c 1 then the object must be explicitly deleted;
* the @c locale will not do so. In this case, the object can be
* maintained across the lifetime of multiple locales.
*/
explicit time_point_put(size_t refs = 0) :
std::locale::facet(refs)
{
}
/**
* @param i an output stream iterator
* @param ios a reference to a ios_base
* @param fill the character used as filler
* @param tp the @c time_point
* @param pattern begin of the formatting pattern
* @param pat_end end of the formatting pattern
*
* @Effects Steps through the sequence from @c pattern to @c pat_end,
* identifying characters that are part of a pattern sequence. Each character
* that is not part of a pattern sequence is written to @c s immediately, and
* each pattern sequence, as it is identified, results in a call to
* @c put_duration or @c put_epoch;
* thus, pattern elements and other characters are interleaved in the output
* in the order in which they appear in the pattern. Pattern sequences are
* identified by converting each character @c c to a @c char value as if by
* @c ct.narrow(c,0), where @c ct is a reference to @c ctype<charT> obtained from
* @c ios.getloc(). The first character of each sequence is equal to @c '%',
* followed by a pattern specifier character @c spec, which can be @c 'd' for
* the duration value or @c 'e' for the epoch.
* For each valid pattern sequence identified, calls
* <c>put_duration(s, ios, fill, tp.time_since_epoch())</c> or <c>put_epoch(s, ios)</c>.
*
* @Returns An iterator pointing immediately after the last character produced.
*/
template <class Clock, class Duration>
iter_type put(iter_type i, std::ios_base& ios, char_type fill, time_point<Clock, Duration> const& tp, const CharT* pattern,
const CharT* pat_end) const
{
if (std::has_facet<time_point_units<CharT> >(ios.getloc()))
{
time_point_units<CharT> const &facet =
std::use_facet<time_point_units<CharT> >(ios.getloc());
return put(facet, i, ios, fill, tp, pattern, pat_end);
}
else
{
time_point_units_default<CharT> facet;
return put(facet, i, ios, fill, tp, pattern, pat_end);
}
}
template <class Clock, class Duration>
iter_type put(time_point_units<CharT> const& units_facet, iter_type s, std::ios_base& ios, char_type fill,
time_point<Clock, Duration> const& tp, const CharT* pattern, const CharT* pat_end) const
{
const std::ctype<char_type>& ct = std::use_facet<std::ctype<char_type> >(ios.getloc());
for (; pattern != pat_end; ++pattern)
{
if (ct.narrow(*pattern, 0) == '%')
{
if (++pattern == pat_end)
{
*s++ = pattern[-1];
break;
}
char fmt = ct.narrow(*pattern, 0);
switch (fmt)
{
case 'd':
{
s = put_duration(s, ios, fill, tp.time_since_epoch());
break;
}
case 'e':
{
s = put_epoch<Clock> (units_facet, s, ios);
break;
}
default:
BOOST_ASSERT(false && "Boost::Chrono internal error.");
break;
}
}
else
*s++ = *pattern;
}
return s;
}
/**
* @param i an output stream iterator
* @param ios a reference to a ios_base
* @param fill the character used as filler
* @param tp the @c time_point
* @param pattern begin of the formatting pattern
* @param pat_end end of the formatting pattern
*
* @Effects Stores the time_point pattern from the @c time_point_unit facet in let say @c str. Last as if
* @code
* return put(s, ios, dill, tp, str.data(), str.data() + str.size());
* @endcode
* @Returns An iterator pointing immediately after the last character produced.
*/
template <class Clock, class Duration>
iter_type put(iter_type i, std::ios_base& ios, char_type fill, time_point<Clock, Duration> const& tp) const
{
if (std::has_facet<time_point_units<CharT> >(ios.getloc()))
{
time_point_units<CharT> const &facet =
std::use_facet<time_point_units<CharT> >(ios.getloc());
std::basic_string<CharT> str = facet.get_pattern();
return put(facet, i, ios, fill, tp, str.data(), str.data() + str.size());
}
else
{
time_point_units_default<CharT> facet;
std::basic_string<CharT> str = facet.get_pattern();
return put(facet, i, ios, fill, tp, str.data(), str.data() + str.size());
}
}
/**
* @param i an output stream iterator
* @param ios a reference to a ios_base
* @param fill the character used as filler
* @param d the @c duration
* @Effects As if <c>facet.put(s, ios, fill, d)</c> where facet is the @c duration_put<CharT> facet associated
* to the @c ios or a new instance of @c duration_put<CharT>.
* @Returns An iterator pointing immediately after the last character produced.
*/
template <typename Rep, typename Period>
iter_type put_duration(iter_type i, std::ios_base& ios, char_type fill, duration<Rep, Period> const& d) const
{
if (std::has_facet<duration_put<CharT> >(ios.getloc()))
{
duration_put<CharT> const &facet = std::use_facet<duration_put<CharT> >(ios.getloc());
return facet.put(i, ios, fill, d);
}
else
{
duration_put<CharT> facet;
return facet.put(i, ios, fill, d);
}
}
/**
*
* @param i an output stream iterator
* @param ios a reference to a ios_base
* @Effects As if
* @code
* string_type str = facet.template get_epoch<Clock>();
* s=std::copy(str.begin(), str.end(), s);
* @endcode
* where facet is the @c time_point_units<CharT> facet associated
* to the @c ios or a new instance of @c time_point_units_default<CharT>.
* @Returns s, iterator pointing immediately after the last character produced.
*/
template <typename Clock>
iter_type put_epoch(iter_type i, std::ios_base& os) const
{
if (std::has_facet<time_point_units<CharT> >(os.getloc()))
{
time_point_units<CharT> const &facet = std::use_facet<time_point_units<CharT> >(os.getloc());
return put_epoch<Clock> (facet, i, os);
}
else
{
time_point_units_default<CharT> facet;
return put_epoch<Clock> (facet, i, os);
}
}
template <typename Clock>
iter_type put_epoch(time_point_units<CharT> const& facet, iter_type s, std::ios_base&) const
{
string_type str = facet.template get_epoch<Clock>();
s= std::copy(str.begin(), str.end(), s);
return s;
}
/**
* Unique identifier for this type of facet.
*/
static std::locale::id id;
/**
* @Effects Destroy the facet
*/
~time_point_put()
{
}
};
template <class CharT, class OutputIterator>
std::locale::id time_point_put<CharT, OutputIterator>::id;
} // chrono
} // boost
#endif // header

View File

@@ -0,0 +1,260 @@
// (C) Copyright Howard Hinnant
// (C) Copyright 2011 Vicente J. Botet Escriba
// Copyright (c) Microsoft Corporation 2014
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
#ifndef BOOST_CHRONO_IO_TIME_POINT_UNITS_HPP
#define BOOST_CHRONO_IO_TIME_POINT_UNITS_HPP
#include <boost/chrono/config.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
#include <boost/chrono/system_clocks.hpp>
#include <boost/chrono/thread_clock.hpp>
#include <boost/chrono/io/ios_base_state.hpp>
#include <string>
#include <iosfwd>
#include <ios>
#include <locale>
#include <algorithm>
namespace boost
{
namespace chrono
{
/**
* customization point to the epoch associated to the clock @c Clock
* The default calls @c f.do_get_epoch(Clock()). The user can overload this function.
* @return the string epoch associated to the @c Clock
*/
template <typename CharT, typename Clock, typename TPUFacet>
std::basic_string<CharT> get_epoch_custom(Clock, TPUFacet& f)
{
return f.do_get_epoch(Clock());
}
/**
* @c time_point_units facet gives useful information about the time_point pattern,
* the text associated to a time_point's epoch,
*/
template <typename CharT=char>
class time_point_units: public std::locale::facet
{
public:
/**
* Type of character the facet is instantiated on.
*/
typedef CharT char_type;
/**
* Type of character string used by member functions.
*/
typedef std::basic_string<char_type> string_type;
/**
* Unique identifier for this type of facet.
*/
static std::locale::id id;
/**
* Construct a @c time_point_units facet.
* @param refs
* @Effects Construct a @c time_point_units facet.
* If the @c refs argument is @c 0 then destruction of the object is
* delegated to the @c locale, or locales, containing it. This allows
* the user to ignore lifetime management issues. On the other had,
* if @c refs is @c 1 then the object must be explicitly deleted;
* the @c locale will not do so. In this case, the object can be
* maintained across the lifetime of multiple locales.
*/
explicit time_point_units(size_t refs = 0) :
std::locale::facet(refs)
{
}
/**
* @return the pattern to be used by default.
*/
virtual string_type get_pattern() const =0;
/**
* @return the epoch associated to the clock @c Clock calling @c do_get_epoch(Clock())
*/
template <typename Clock>
string_type get_epoch() const
{
return get_epoch_custom<CharT>(Clock(), *this);
}
protected:
/**
* Destroy the facet.
*/
virtual ~time_point_units() {}
public:
/**
*
* @param c a dummy instance of @c system_clock.
* @return The epoch string associated to the @c system_clock.
*/
virtual string_type do_get_epoch(system_clock) const=0;
/**
*
* @param c a dummy instance of @c steady_clock.
* @return The epoch string associated to the @c steady_clock.
*/
virtual string_type do_get_epoch(steady_clock) const=0;
#if defined(BOOST_CHRONO_HAS_PROCESS_CLOCKS)
/**
*
* @param c a dummy instance of @c process_real_cpu_clock.
* @return The epoch string associated to the @c process_real_cpu_clock.
*/
virtual string_type do_get_epoch(process_real_cpu_clock) const=0;
#if ! BOOST_OS_WINDOWS || BOOST_PLAT_WINDOWS_DESKTOP
/**
*
* @param c a dummy instance of @c process_user_cpu_clock.
* @return The epoch string associated to the @c process_user_cpu_clock.
*/
virtual string_type do_get_epoch(process_user_cpu_clock) const=0;
/**
*
* @param c a dummy instance of @c process_system_cpu_clock.
* @return The epoch string associated to the @c process_system_cpu_clock.
*/
virtual string_type do_get_epoch(process_system_cpu_clock) const=0;
/**
*
* @param c a dummy instance of @c process_cpu_clock.
* @return The epoch string associated to the @c process_cpu_clock.
*/
virtual string_type do_get_epoch(process_cpu_clock) const=0;
#endif
#endif
#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
/**
*
* @param c a dummy instance of @c thread_clock.
* @return The epoch string associated to the @c thread_clock.
*/
virtual string_type do_get_epoch(thread_clock) const=0;
#endif
};
template <typename CharT>
std::locale::id time_point_units<CharT>::id;
// This class is used to define the strings for the default English
template <typename CharT=char>
class time_point_units_default: public time_point_units<CharT>
{
public:
/**
* Type of character the facet is instantiated on.
*/
typedef CharT char_type;
/**
* Type of character string returned by member functions.
*/
typedef std::basic_string<char_type> string_type;
explicit time_point_units_default(size_t refs = 0) :
time_point_units<CharT> (refs)
{
}
~time_point_units_default() {}
/**
* @return the default pattern "%d%e".
*/
string_type get_pattern() const
{
static const CharT t[] =
{ '%', 'd', '%', 'e' };
static const string_type pattern(t, t + sizeof (t) / sizeof (t[0]));
return pattern;
}
//protected:
/**
* @param c a dummy instance of @c system_clock.
* @return The epoch string returned by @c clock_string<system_clock,CharT>::since().
*/
string_type do_get_epoch(system_clock ) const
{
return clock_string<system_clock,CharT>::since();
}
/**
* @param c a dummy instance of @c steady_clock.
* @return The epoch string returned by @c clock_string<steady_clock,CharT>::since().
*/
string_type do_get_epoch(steady_clock ) const
{
return clock_string<steady_clock,CharT>::since();
}
#if defined(BOOST_CHRONO_HAS_PROCESS_CLOCKS)
/**
* @param c a dummy instance of @c process_real_cpu_clock.
* @return The epoch string returned by @c clock_string<process_real_cpu_clock,CharT>::since().
*/
string_type do_get_epoch(process_real_cpu_clock ) const
{
return clock_string<process_real_cpu_clock,CharT>::since();
}
#if ! BOOST_OS_WINDOWS || BOOST_PLAT_WINDOWS_DESKTOP
/**
* @param c a dummy instance of @c process_user_cpu_clock.
* @return The epoch string returned by @c clock_string<process_user_cpu_clock,CharT>::since().
*/
string_type do_get_epoch(process_user_cpu_clock ) const
{
return clock_string<process_user_cpu_clock,CharT>::since();
}
/**
* @param c a dummy instance of @c process_system_cpu_clock.
* @return The epoch string returned by @c clock_string<process_system_cpu_clock,CharT>::since().
*/
string_type do_get_epoch(process_system_cpu_clock ) const
{
return clock_string<process_system_cpu_clock,CharT>::since();
}
/**
* @param c a dummy instance of @c process_cpu_clock.
* @return The epoch string returned by @c clock_string<process_cpu_clock,CharT>::since().
*/
string_type do_get_epoch(process_cpu_clock ) const
{
return clock_string<process_cpu_clock,CharT>::since();
}
#endif
#endif
#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
/**
* @param c a dummy instance of @c thread_clock.
* @return The epoch string returned by @c clock_string<thread_clock,CharT>::since().
*/
string_type do_get_epoch(thread_clock ) const
{
return clock_string<thread_clock,CharT>::since();
}
#endif
};
} // chrono
} // boost
#endif // header

View File

@@ -0,0 +1,31 @@
// (C) Copyright Howard Hinnant
// (C) Copyright 2010-2011 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
// This code was adapted by Vicente from Howard Hinnant's experimental work
// on chrono i/o to Boost
#ifndef BOOST_CHRONO_IO_TIMEZONE_HPP
#define BOOST_CHRONO_IO_TIMEZONE_HPP
#include <boost/core/scoped_enum.hpp>
namespace boost
{
namespace chrono
{
/**
* Scoped enumeration emulation stating whether the time_point for system_clock I/O is UTC or local.
*/
BOOST_SCOPED_ENUM_DECLARE_BEGIN(timezone)
{
utc, local
}
BOOST_SCOPED_ENUM_DECLARE_END(timezone)
} // chrono
} // boost
#endif // header

View File

@@ -0,0 +1,437 @@
// boost/chrono/utility/ios_base_pword_ptr.hpp ------------------------------------------------------------//
// Copyright 2011 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/chrono for documentation.
#ifndef BOOST_CHRONO_UTILITY_IOS_BASE_STATE_PTR_HPP
#define BOOST_CHRONO_UTILITY_IOS_BASE_STATE_PTR_HPP
#include <ios>
#include <boost/assert.hpp>
/**
*
*/
namespace boost
{
namespace chrono
{
namespace detail
{
/**
* xalloc key holder.
*/
template <typename T>
struct xalloc_key_holder
{
static int value; //< the xalloc value associated to T.
static bool initialized; //< whether the value has been initialized or not.
};
template <typename T>
int xalloc_key_holder<T>::value = 0;
template <typename T>
bool xalloc_key_holder<T>::initialized = false;
}
/**
* xalloc key initialiazer.
*
* Declare a static variable of this type to ensure that the xalloc_key_holder<T> is initialized correctly.
*/
template <typename T>
struct xalloc_key_initializer
{
xalloc_key_initializer()
{
if (!detail::xalloc_key_holder<T>::initialized)
{
detail::xalloc_key_holder<T>::value = std::ios_base::xalloc();
detail::xalloc_key_holder<T>::initialized = true;
}
}
};
/**
* @c ios_state_ptr is a smart pointer to a ios_base specific state.
*/
template <typename Final, typename T>
class ios_state_ptr
{
ios_state_ptr& operator=(ios_state_ptr const& rhs) ;
public:
/**
* The pointee type
*/
typedef T element_type;
/**
* Explicit constructor.
* @param ios the ios
* @Effects Constructs a @c ios_state_ptr by storing the associated @c ios.
*/
explicit ios_state_ptr(std::ios_base& ios) :
ios_(ios)
{
}
/**
* Nothing to do as xalloc index can not be removed.
*/
~ios_state_ptr()
{
}
/**
* @Effects Allocates the index if not already done.
* Registers the callback responsible of maintaining the state pointer coherency, if not already done.
* Retrieves the associated ios pointer
* @return the retrieved pointer statically casted to const.
*/
T const* get() const BOOST_NOEXCEPT
{
register_once(index(), ios_);
void* &pw = ios_.pword(index());
if (pw == 0)
{
return 0;
}
return static_cast<const T*> (pw);
}
/**
* @Effects Allocates the index if not already done.
* Registers the callback responsible of maintaining the state pointer coherency, if not already done.
* Retrieves the associated ios pointer
* @return the retrieved pointer.
*/
T * get() BOOST_NOEXCEPT
{
register_once(index(), ios_);
void* &pw = ios_.pword(index());
if (pw == 0)
{
return 0;
}
return static_cast<T*> (pw);
}
/**
* @Effects as if @c return get();
* @return the retrieved pointer.
*/
T * operator->()BOOST_NOEXCEPT
{
return get();
}
/**
* @Effects as if @c return get();
* @return the retrieved pointer.
*/
T const * operator->() const BOOST_NOEXCEPT
{
return get();
}
/**
* @Effects as if @c return *get();
* @return a reference to the retrieved state.
* @Remark The behavior is undefined if @c get()==0.
*/
T & operator*() BOOST_NOEXCEPT
{
return *get();
}
/**
* @Effects as if @c return *get();
* @return a reference to the retrieved state.
* @Remark The behavior is undefined if @c get()==0.
*/
T const & operator *() const BOOST_NOEXCEPT
{
return *get();
}
/**
* @Effects reset the current pointer after storing in a temporary variable the pointer to the current state.
* @return the stored state pointer.
*/
T * release() BOOST_NOEXCEPT
{
void*& pw = ios_.pword(index());
T* ptr = static_cast<T*> (pw);
pw = 0;
return ptr;
}
/**
*
* @param new_ptr the new pointer.
* @Effects deletes the current state and replace it with the new one.
*/
void reset(T* new_ptr = 0)BOOST_NOEXCEPT
{
register_once(index(), ios_);
void*& pw = ios_.pword(index());
delete static_cast<T*> (pw);
pw = new_ptr;
}
#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
typedef T* (ios_state_ptr::*bool_type)();
operator bool_type() const BOOST_NOEXCEPT
{
return (get()!=0)?&ios_state_ptr::release:0;
}
bool operator!() const BOOST_NOEXCEPT
{
return (get()==0)?&ios_state_ptr::release:0;
}
#else
/**
* Explicit conversion to bool.
*/
explicit operator bool() const BOOST_NOEXCEPT
{
return get()!=0;
}
#endif
std::ios_base& getios()BOOST_NOEXCEPT
{
return ios_;
}
std::ios_base& getios() const BOOST_NOEXCEPT
{
return ios_;
}
/**
* Implicit conversion to the ios_base
*/
operator std::ios_base&() BOOST_NOEXCEPT
{
return ios_;
}
/**
* Implicit conversion to the ios_base const
*/
operator std::ios_base&() const BOOST_NOEXCEPT
{
return ios_;
}
private:
static inline bool is_registerd(std::ios_base& ios)
{
long iw = ios.iword(index());
return (iw == 1);
}
static inline void set_registered(std::ios_base& ios)
{
long& iw = ios.iword(index());
iw = 1;
}
static inline void callback(std::ios_base::event evt, std::ios_base& ios, int index)
{
switch (evt)
{
case std::ios_base::erase_event:
{
void*& pw = ios.pword(index);
if (pw != 0)
{
T* ptr = static_cast<T*> (pw);
delete ptr;
pw = 0;
}
break;
}
case std::ios_base::copyfmt_event:
{
void*& pw = ios.pword(index);
if (pw != 0)
{
pw = new T(*static_cast<T*> (pw));
}
break;
}
default:
break;
}
}
static inline int index()
{
return detail::xalloc_key_holder<Final>::value;
}
static inline void register_once(int indx, std::ios_base& ios)
{
// needs a mask registered
if (!is_registerd(ios))
{
set_registered(ios);
ios.register_callback(callback, indx);
}
}
protected:
std::ios_base& ios_;
//static detail::xalloc_key_initializer<Final> xalloc_key_initializer_;
};
//template <typename Final, typename T>
//detail::xalloc_key_initializer<Final> ios_state_ptr<Final,T>::xalloc_key_initializer_;
/**
* @c ios_state_not_null_ptr is a non null variant of @c ios_state_ptr.
* @tparm T
* @Requires @c T must be @c DefaultConstructible and @c HeapAllocatable
*/
template <typename Final, typename T>
class ios_state_not_null_ptr: public ios_state_ptr<Final, T>
{
typedef ios_state_ptr<Final, T> base_type;
public:
explicit ios_state_not_null_ptr(std::ios_base& ios) :
base_type(ios)
{
if (this->get() == 0)
{
this->base_type::reset(new T());
}
}
~ios_state_not_null_ptr()
{
}
void reset(T* new_value) BOOST_NOEXCEPT
{
BOOST_ASSERT(new_value!=0);
this->base_type::reset(new_value);
}
};
/**
* This class is useful to associate some flags to an std::ios_base.
*/
template <typename Final>
class ios_flags
{
public:
/**
*
* @param ios the associated std::ios_base.
* @Postcondition <c>flags()==0</c>
*/
explicit ios_flags(std::ios_base& ios) :
ios_(ios)
{
}
~ios_flags()
{
}
/**
* @Returns The format control information.
*/
long flags() const BOOST_NOEXCEPT
{
return value();
}
/**
* @param v the new bit mask.
* @Postcondition <c>v == flags()</c>.
* @Returns The previous value of @c flags().
*/
long flags(long v)BOOST_NOEXCEPT
{
long tmp = flags();
ref() = v;
return tmp;
}
/**
* @param v the new value
* @Effects: Sets @c v in @c flags().
* @Returns: The previous value of @c flags().
*/
long setf(long v)
{
long tmp = value();
ref() |= v;
return tmp;
}
/**
* @param mask the bit mask to clear.
* @Effects: Clears @c mask in @c flags().
*/
void unsetf(long mask)
{
ref() &= ~mask;
}
/**
*
* @param v
* @param mask
* @Effects: Clears @c mask in @c flags(), sets <c>v & mask</c> in @c flags().
* @Returns: The previous value of flags().
*/
long setf(long v, long mask)
{
long tmp = value();
unsetf(mask);
ref() |= v & mask;
return tmp;
}
/**
* implicit conversion to the @c ios_base
*/
operator std::ios_base&()BOOST_NOEXCEPT
{
return ios_;
}
/**
* implicit conversion to the @c ios_base const
*/
operator std::ios_base const&() const BOOST_NOEXCEPT
{
return ios_;
}
private:
long value() const BOOST_NOEXCEPT
{
return ios_.iword(index());
}
long& ref()BOOST_NOEXCEPT
{
return ios_.iword(index());
}
static inline int index()
{
return detail::xalloc_key_holder<Final>::value;
}
ios_flags& operator=(ios_flags const& rhs) ;
std::ios_base& ios_;
//static detail::xalloc_key_initializer<Final> xalloc_key_initializer_;
};
//template <typename Final>
//detail::xalloc_key_initializer<Final> ios_flags<Final>::xalloc_key_initializer_;
} // namespace chrono
} // namespace boost
#endif // header

View File

@@ -0,0 +1,101 @@
// boost/chrono/utility/manip_base.hpp ------------------------------------------------------------//
// Copyright 2011 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/chrono for documentation.
#ifndef BOOST_CHRONO_UTILITY_MANIP_BASE_PTR_HPP
#define BOOST_CHRONO_UTILITY_MANIP_BASE_PTR_HPP
#include <ios>
/**
*
*/
namespace boost
{
namespace chrono
{
/**
* manip is a manipulator mixin class following the CRTP.
* @tparam Final the derived from manip and final type
*
* @Example
* @code
class mendl: public manip<mendl>
{
public:
explicit mendl(size_t how_many) :
count(how_many) {}
template <typename out_stream>
void operator()(out_stream &out) const
{
for (size_t line = 0; line < count; ++line)
{
out.put(out.widen('\n'));
}
out.flush();
}
private:
size_t count;
};
* @codeend
*/
template <typename Final>
class manip
{
public:
/**
*
* @param ios the io stream or ios_base.
* @Effects calls to the manipulator final functor.
*/
//template <typename out_stream>
void operator()(std::ios_base &ios) const
{
(*static_cast<const Final *> (this))(ios);
}
};
/**
* @c manip stream inserter
* @param out the io stream or ios_base.
* @param op the manipulator instance.
* @Effects if @c out is good calls to the manipulator functor @op.
* @return @c out
*/
template <typename out_stream, typename manip_type>
out_stream &operator<<(out_stream &out, const manip<manip_type> &op)
{
if (out.good())
op(out);
return out;
}
/**
* @c manip stream extractor
* @param in the io stream or ios_base.
* @param op the manipulator instance.
* @Effects if @c in is good calls to the manipulator functor @op.
* @return @c in
*/
template <typename in_stream, typename manip_type>
in_stream &operator>>(in_stream &in, const manip<manip_type> &op)
{
if (in.good())
op(in);
return in;
}
} // namespace chrono
} // namespace boost
#endif // header

View File

@@ -0,0 +1,50 @@
// boost/chrono/utility/to_string.hpp
//
// Copyright 2011 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
#ifndef BOOST_CHRONO_UTILITY_TO_STRING_HPP
#define BOOST_CHRONO_UTILITY_TO_STRING_HPP
#include <boost/chrono/config.hpp>
#include <string>
#include <sstream>
namespace boost
{
namespace chrono
{
template <typename CharT, typename T>
std::basic_string<CharT> to_basic_string(T const&v) {
std::basic_stringstream<CharT> sstr;
sstr << v;
return sstr.str();
}
template <typename T>
std::string to_string(T const&v) {
return to_basic_string<char>(v);
}
#ifndef BOOST_NO_STD_WSTRING
template <typename T>
std::wstring to_wstring(T const&v) {
return to_basic_string<wchar_t>(v);
}
#endif
#if BOOST_CHRONO_HAS_UNICODE_SUPPORT
template <typename T>
std::basic_string<char16_t> to_u16string(T const&v) {
return to_basic_string<char16_t>(v);
}
template <typename T>
std::basic_string<char32_t> to_u32string(T const&v) {
return to_basic_string<char32_t>(v);
}
#endif
} // chrono
} // boost
#endif // header

View File

@@ -0,0 +1,635 @@
// chrono_io
//
// (C) Copyright Howard Hinnant
// (C) Copyright 2010 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
// This code was adapted by Vicente from Howard Hinnant's experimental work
// on chrono i/o under lvm/libc++ to Boost
#ifndef BOOST_CHRONO_IO_V1_CHRONO_IO_HPP
#define BOOST_CHRONO_IO_V1_CHRONO_IO_HPP
#include <boost/chrono/chrono.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
#include <boost/chrono/thread_clock.hpp>
#include <boost/chrono/clock_string.hpp>
#include <boost/ratio/ratio_io.hpp>
#include <locale>
#include <boost/type_traits/is_scalar.hpp>
#include <boost/type_traits/is_signed.hpp>
#include <boost/mpl/if.hpp>
#include <boost/integer/common_factor_rt.hpp>
#include <boost/chrono/detail/scan_keyword.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp>
namespace boost
{
namespace chrono
{
template <class CharT>
class duration_punct
: public std::locale::facet
{
public:
typedef std::basic_string<CharT> string_type;
enum {use_long, use_short};
private:
bool use_short_;
string_type long_seconds_;
string_type long_minutes_;
string_type long_hours_;
string_type short_seconds_;
string_type short_minutes_;
string_type short_hours_;
template <class Period>
string_type short_name(Period) const
{return ::boost::ratio_string<Period, CharT>::short_name() + short_seconds_;}
string_type short_name(ratio<1>) const {return short_seconds_;}
string_type short_name(ratio<60>) const {return short_minutes_;}
string_type short_name(ratio<3600>) const {return short_hours_;}
template <class Period>
string_type long_name(Period) const
{return ::boost::ratio_string<Period, CharT>::long_name() + long_seconds_;}
string_type long_name(ratio<1>) const {return long_seconds_;}
string_type long_name(ratio<60>) const {return long_minutes_;}
string_type long_name(ratio<3600>) const {return long_hours_;}
void init_C();
public:
static std::locale::id id;
explicit duration_punct(int use = use_long)
: use_short_(use==use_short) {init_C();}
duration_punct(int use,
const string_type& long_seconds, const string_type& long_minutes,
const string_type& long_hours, const string_type& short_seconds,
const string_type& short_minutes, const string_type& short_hours);
duration_punct(int use, const duration_punct& d);
template <class Period>
string_type short_name() const
{return short_name(typename Period::type());}
template <class Period>
string_type long_name() const
{return long_name(typename Period::type());}
template <class Period>
string_type plural() const
{return long_name(typename Period::type());}
template <class Period>
string_type singular() const
{
return string_type(long_name(typename Period::type()), 0, long_name(typename Period::type()).size()-1);
}
template <class Period>
string_type name() const
{
if (use_short_) return short_name<Period>();
else {
return long_name<Period>();
}
}
template <class Period, class D>
string_type name(D v) const
{
if (use_short_) return short_name<Period>();
else
{
if (v==-1 || v==1)
return singular<Period>();
else
return plural<Period>();
}
}
bool is_short_name() const {return use_short_;}
bool is_long_name() const {return !use_short_;}
};
template <class CharT>
std::locale::id
duration_punct<CharT>::id;
template <class CharT>
void
duration_punct<CharT>::init_C()
{
short_seconds_ = CharT('s');
short_minutes_ = CharT('m');
short_hours_ = CharT('h');
const CharT s[] = {'s', 'e', 'c', 'o', 'n', 'd', 's'};
const CharT m[] = {'m', 'i', 'n', 'u', 't', 'e', 's'};
const CharT h[] = {'h', 'o', 'u', 'r', 's'};
long_seconds_.assign(s, s + sizeof(s)/sizeof(s[0]));
long_minutes_.assign(m, m + sizeof(m)/sizeof(m[0]));
long_hours_.assign(h, h + sizeof(h)/sizeof(h[0]));
}
template <class CharT>
duration_punct<CharT>::duration_punct(int use,
const string_type& long_seconds, const string_type& long_minutes,
const string_type& long_hours, const string_type& short_seconds,
const string_type& short_minutes, const string_type& short_hours)
: use_short_(use==use_short),
long_seconds_(long_seconds),
long_minutes_(long_minutes),
long_hours_(long_hours),
short_seconds_(short_seconds),
short_minutes_(short_minutes),
short_hours_(short_hours)
{}
template <class CharT>
duration_punct<CharT>::duration_punct(int use, const duration_punct& d)
: use_short_(use==use_short),
long_seconds_(d.long_seconds_),
long_minutes_(d.long_minutes_),
long_hours_(d.long_hours_),
short_seconds_(d.short_seconds_),
short_minutes_(d.short_minutes_),
short_hours_(d.short_hours_)
{}
template <class CharT, class Traits>
std::basic_ostream<CharT, Traits>&
duration_short(std::basic_ostream<CharT, Traits>& os)
{
typedef duration_punct<CharT> Facet;
std::locale loc = os.getloc();
if (std::has_facet<Facet>(loc))
{
const Facet& f = std::use_facet<Facet>(loc);
if (f.is_long_name())
os.imbue(std::locale(loc, new Facet(Facet::use_short, f)));
}
else
os.imbue(std::locale(loc, new Facet(Facet::use_short)));
return os;
}
template <class CharT, class Traits>
std::basic_ostream<CharT, Traits>&
duration_long(std::basic_ostream<CharT, Traits>& os)
{
typedef duration_punct<CharT> Facet;
std::locale loc = os.getloc();
if (std::has_facet<Facet>(loc))
{
const Facet& f = std::use_facet<Facet>(loc);
if (f.is_short_name())
os.imbue(std::locale(loc, new Facet(Facet::use_long, f)));
}
return os;
}
template <class CharT, class Traits, class Rep, class Period>
std::basic_ostream<CharT, Traits>&
operator<<(std::basic_ostream<CharT, Traits>& os, const duration<Rep, Period>& d)
{
typedef duration_punct<CharT> Facet;
std::locale loc = os.getloc();
if (!std::has_facet<Facet>(loc))
os.imbue(std::locale(loc, new Facet));
const Facet& f = std::use_facet<Facet>(os.getloc());
return os << d.count() << ' ' << f.template name<Period>(d.count());
}
namespace chrono_detail {
template <class Rep, bool = is_scalar<Rep>::value>
struct duration_io_intermediate
{
typedef Rep type;
};
template <class Rep>
struct duration_io_intermediate<Rep, true>
{
typedef typename mpl::if_c
<
is_floating_point<Rep>::value,
long double,
typename mpl::if_c
<
is_signed<Rep>::value,
long long,
unsigned long long
>::type
>::type type;
};
template <typename intermediate_type>
typename enable_if<is_integral<intermediate_type>, bool>::type
reduce(intermediate_type& r, unsigned long long& den, std::ios_base::iostate& err)
{
typedef typename common_type<intermediate_type, unsigned long long>::type common_type_t;
// Reduce r * num / den
common_type_t t = integer::gcd<common_type_t>(common_type_t(r), common_type_t(den));
r /= t;
den /= t;
if (den != 1)
{
// Conversion to Period is integral and not exact
err |= std::ios_base::failbit;
return false;
}
return true;
}
template <typename intermediate_type>
typename disable_if<is_integral<intermediate_type>, bool>::type
reduce(intermediate_type& , unsigned long long& , std::ios_base::iostate& )
{
return true;
}
}
template <class CharT, class Traits, class Rep, class Period>
std::basic_istream<CharT, Traits>&
operator>>(std::basic_istream<CharT, Traits>& is, duration<Rep, Period>& d)
{
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
typedef duration_punct<CharT> Facet;
std::locale loc = is.getloc();
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
if (!std::has_facet<Facet>(loc)) {
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
is.imbue(std::locale(loc, new Facet));
}
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
loc = is.getloc();
const Facet& f = std::use_facet<Facet>(loc);
typedef typename chrono_detail::duration_io_intermediate<Rep>::type intermediate_type;
intermediate_type r;
std::ios_base::iostate err = std::ios_base::goodbit;
// read value into r
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
is >> r;
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
if (is.good())
{
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
// now determine unit
typedef std::istreambuf_iterator<CharT, Traits> in_iterator;
in_iterator i(is);
in_iterator e;
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
if (i != e && *i == ' ') // mandatory ' ' after value
{
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
++i;
if (i != e)
{
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
// unit is num / den (yet to be determined)
unsigned long long num = 0;
unsigned long long den = 0;
if (*i == '[')
{
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
// parse [N/D]s or [N/D]seconds format
++i;
CharT x;
is >> num >> x >> den;
if (!is.good() || (x != '/'))
{
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
is.setstate(is.failbit);
return is;
}
i = in_iterator(is);
if (*i != ']')
{
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
is.setstate(is.failbit);
return is;
}
++i;
const std::basic_string<CharT> units[] =
{
f.template singular<ratio<1> >(),
f.template plural<ratio<1> >(),
f.template short_name<ratio<1> >()
};
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
const std::basic_string<CharT>* k = chrono_detail::scan_keyword(i, e,
units, units + sizeof(units)/sizeof(units[0]),
//~ std::use_facet<std::ctype<CharT> >(loc),
err);
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
is.setstate(err);
switch ((k - units) / 3)
{
case 0:
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
break;
default:
is.setstate(err);
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
return is;
}
}
else
{
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
// parse SI name, short or long
const std::basic_string<CharT> units[] =
{
f.template singular<atto>(),
f.template plural<atto>(),
f.template short_name<atto>(),
f.template singular<femto>(),
f.template plural<femto>(),
f.template short_name<femto>(),
f.template singular<pico>(),
f.template plural<pico>(),
f.template short_name<pico>(),
f.template singular<nano>(),
f.template plural<nano>(),
f.template short_name<nano>(),
f.template singular<micro>(),
f.template plural<micro>(),
f.template short_name<micro>(),
f.template singular<milli>(),
f.template plural<milli>(),
f.template short_name<milli>(),
f.template singular<centi>(),
f.template plural<centi>(),
f.template short_name<centi>(),
f.template singular<deci>(),
f.template plural<deci>(),
f.template short_name<deci>(),
f.template singular<deca>(),
f.template plural<deca>(),
f.template short_name<deca>(),
f.template singular<hecto>(),
f.template plural<hecto>(),
f.template short_name<hecto>(),
f.template singular<kilo>(),
f.template plural<kilo>(),
f.template short_name<kilo>(),
f.template singular<mega>(),
f.template plural<mega>(),
f.template short_name<mega>(),
f.template singular<giga>(),
f.template plural<giga>(),
f.template short_name<giga>(),
f.template singular<tera>(),
f.template plural<tera>(),
f.template short_name<tera>(),
f.template singular<peta>(),
f.template plural<peta>(),
f.template short_name<peta>(),
f.template singular<exa>(),
f.template plural<exa>(),
f.template short_name<exa>(),
f.template singular<ratio<1> >(),
f.template plural<ratio<1> >(),
f.template short_name<ratio<1> >(),
f.template singular<ratio<60> >(),
f.template plural<ratio<60> >(),
f.template short_name<ratio<60> >(),
f.template singular<ratio<3600> >(),
f.template plural<ratio<3600> >(),
f.template short_name<ratio<3600> >()
};
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
const std::basic_string<CharT>* k = chrono_detail::scan_keyword(i, e,
units, units + sizeof(units)/sizeof(units[0]),
//~ std::use_facet<std::ctype<CharT> >(loc),
err);
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
switch ((k - units) / 3)
{
case 0:
num = 1ULL;
den = 1000000000000000000ULL;
break;
case 1:
num = 1ULL;
den = 1000000000000000ULL;
break;
case 2:
num = 1ULL;
den = 1000000000000ULL;
break;
case 3:
num = 1ULL;
den = 1000000000ULL;
break;
case 4:
num = 1ULL;
den = 1000000ULL;
break;
case 5:
num = 1ULL;
den = 1000ULL;
break;
case 6:
num = 1ULL;
den = 100ULL;
break;
case 7:
num = 1ULL;
den = 10ULL;
break;
case 8:
num = 10ULL;
den = 1ULL;
break;
case 9:
num = 100ULL;
den = 1ULL;
break;
case 10:
num = 1000ULL;
den = 1ULL;
break;
case 11:
num = 1000000ULL;
den = 1ULL;
break;
case 12:
num = 1000000000ULL;
den = 1ULL;
break;
case 13:
num = 1000000000000ULL;
den = 1ULL;
break;
case 14:
num = 1000000000000000ULL;
den = 1ULL;
break;
case 15:
num = 1000000000000000000ULL;
den = 1ULL;
break;
case 16:
num = 1;
den = 1;
break;
case 17:
num = 60;
den = 1;
break;
case 18:
num = 3600;
den = 1;
break;
default:
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
is.setstate(err|is.failbit);
return is;
}
}
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
// unit is num/den
// r should be multiplied by (num/den) / Period
// Reduce (num/den) / Period to lowest terms
unsigned long long gcd_n1_n2 = integer::gcd<unsigned long long>(num, Period::num);
unsigned long long gcd_d1_d2 = integer::gcd<unsigned long long>(den, Period::den);
num /= gcd_n1_n2;
den /= gcd_d1_d2;
unsigned long long n2 = Period::num / gcd_n1_n2;
unsigned long long d2 = Period::den / gcd_d1_d2;
if (num > (std::numeric_limits<unsigned long long>::max)() / d2 ||
den > (std::numeric_limits<unsigned long long>::max)() / n2)
{
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
// (num/den) / Period overflows
is.setstate(err|is.failbit);
return is;
}
num *= d2;
den *= n2;
typedef typename common_type<intermediate_type, unsigned long long>::type common_type_t;
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
// num / den is now factor to multiply by r
if (!chrono_detail::reduce(r, den, err))
{
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
is.setstate(err|is.failbit);
return is;
}
//if (r > ((duration_values<common_type_t>::max)() / num))
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
if (chrono::detail::gt(r,((duration_values<common_type_t>::max)() / num)))
{
// Conversion to Period overflowed
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
is.setstate(err|is.failbit);
return is;
}
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
common_type_t t = r * num;
t /= den;
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
if (t > duration_values<common_type_t>::zero())
{
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
if ( (duration_values<Rep>::max)() < Rep(t))
{
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
// Conversion to Period overflowed
is.setstate(err|is.failbit);
return is;
}
}
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
// Success! Store it.
d = duration<Rep, Period>(Rep(t));
is.setstate(err);
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
return is;
}
else {
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
is.setstate(is.failbit | is.eofbit);
return is;
}
}
else
{
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
if (i == e)
is.setstate(is.failbit|is.eofbit);
else
is.setstate(is.failbit);
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
return is;
}
}
else {
//std::cerr << __FILE__ << "[" << __LINE__ << "]"<< std::endl;
//is.setstate(is.failbit);
return is;
}
}
template <class CharT, class Traits, class Clock, class Duration>
std::basic_ostream<CharT, Traits>&
operator<<(std::basic_ostream<CharT, Traits>& os,
const time_point<Clock, Duration>& tp)
{
return os << tp.time_since_epoch() << clock_string<Clock, CharT>::since();
}
template <class CharT, class Traits, class Clock, class Duration>
std::basic_istream<CharT, Traits>&
operator>>(std::basic_istream<CharT, Traits>& is,
time_point<Clock, Duration>& tp)
{
Duration d;
is >> d;
if (is.good())
{
const std::basic_string<CharT> units=clock_string<Clock, CharT>::since();
std::ios_base::iostate err = std::ios_base::goodbit;
typedef std::istreambuf_iterator<CharT, Traits> in_iterator;
in_iterator i(is);
in_iterator e;
std::ptrdiff_t k = chrono_detail::scan_keyword(i, e,
&units, &units + 1,
//~ std::use_facet<std::ctype<CharT> >(is.getloc()),
err) - &units;
is.setstate(err);
if (k == 1)
{
is.setstate(err | is.failbit);
// failed to read epoch string
return is;
}
tp = time_point<Clock, Duration>(d);
}
else
is.setstate(is.failbit);
return is;
}
} // chrono
}
#endif // BOOST_CHRONO_CHRONO_IO_HPP

View File

@@ -0,0 +1,525 @@
// boost/chrono/process_cpu_clocks.hpp -----------------------------------------------------------//
// Copyright 2009-2011 Vicente J. Botet Escriba
// Copyright (c) Microsoft Corporation 2014
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/system for documentation.
#ifndef BOOST_CHRONO_PROCESS_CPU_CLOCKS_HPP
#define BOOST_CHRONO_PROCESS_CPU_CLOCKS_HPP
#include <boost/chrono/config.hpp>
#if defined(BOOST_CHRONO_HAS_PROCESS_CLOCKS)
#include <boost/chrono/duration.hpp>
#include <boost/chrono/time_point.hpp>
#include <boost/operators.hpp>
#include <boost/chrono/detail/system.hpp>
#include <iosfwd>
#include <boost/type_traits/common_type.hpp>
#include <boost/chrono/clock_string.hpp>
#ifndef BOOST_CHRONO_HEADER_ONLY
#include <boost/config/abi_prefix.hpp> // must be the last #include
#endif
namespace boost { namespace chrono {
class BOOST_CHRONO_DECL process_real_cpu_clock {
public:
typedef nanoseconds duration;
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<process_real_cpu_clock> time_point;
BOOST_STATIC_CONSTEXPR bool is_steady = true;
static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT;
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
static BOOST_CHRONO_INLINE time_point now(system::error_code & ec );
#endif
};
#if ! BOOST_OS_WINDOWS || BOOST_PLAT_WINDOWS_DESKTOP
class BOOST_CHRONO_DECL process_user_cpu_clock {
public:
typedef nanoseconds duration;
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<process_user_cpu_clock> time_point;
BOOST_STATIC_CONSTEXPR bool is_steady = true;
static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT;
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
static BOOST_CHRONO_INLINE time_point now(system::error_code & ec );
#endif
};
class BOOST_CHRONO_DECL process_system_cpu_clock {
public:
typedef nanoseconds duration;
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<process_system_cpu_clock> time_point;
BOOST_STATIC_CONSTEXPR bool is_steady = true;
static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT;
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
static BOOST_CHRONO_INLINE time_point now(system::error_code & ec );
#endif
};
#endif
template <typename Rep>
struct process_times
: arithmetic<process_times<Rep>,
multiplicative<process_times<Rep>, Rep,
less_than_comparable<process_times<Rep> > > >
{
//typedef process_real_cpu_clock::rep rep;
typedef Rep rep;
process_times()
: real(0)
, user(0)
, system(0){}
#if ! defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
template <typename Rep2>
explicit process_times(
Rep2 r)
: real(r)
, user(r)
, system(r){}
#endif
template <typename Rep2>
explicit process_times(
process_times<Rep2> const& rhs)
: real(rhs.real)
, user(rhs.user)
, system(rhs.system){}
process_times(
rep r,
rep u,
rep s)
: real(r)
, user(u)
, system(s){}
rep real; // real (i.e wall clock) time
rep user; // user cpu time
rep system; // system cpu time
#if ! defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
operator rep() const
{
return real;
}
#endif
template <typename Rep2>
bool operator==(process_times<Rep2> const& rhs) {
return (real==rhs.real &&
user==rhs.user &&
system==rhs.system);
}
process_times& operator+=(
process_times const& rhs)
{
real+=rhs.real;
user+=rhs.user;
system+=rhs.system;
return *this;
}
process_times& operator-=(
process_times const& rhs)
{
real-=rhs.real;
user-=rhs.user;
system-=rhs.system;
return *this;
}
process_times& operator*=(
process_times const& rhs)
{
real*=rhs.real;
user*=rhs.user;
system*=rhs.system;
return *this;
}
process_times& operator*=(rep const& rhs)
{
real*=rhs;
user*=rhs;
system*=rhs;
return *this;
}
process_times& operator/=(process_times const& rhs)
{
real/=rhs.real;
user/=rhs.user;
system/=rhs.system;
return *this;
}
process_times& operator/=(rep const& rhs)
{
real/=rhs;
user/=rhs;
system/=rhs;
return *this;
}
bool operator<(process_times const & rhs) const
{
if (real < rhs.real) return true;
if (real > rhs.real) return false;
if (user < rhs.user) return true;
if (user > rhs.user) return false;
if (system < rhs.system) return true;
else return false;
}
template <class CharT, class Traits>
void print(std::basic_ostream<CharT, Traits>& os) const
{
os << "{"<< real <<";"<< user <<";"<< system << "}";
}
template <class CharT, class Traits>
void read(std::basic_istream<CharT, Traits>& is)
{
typedef std::istreambuf_iterator<CharT, Traits> in_iterator;
in_iterator i(is);
in_iterator e;
if (i == e || *i++ != '{') // mandatory '{'
{
is.setstate(is.failbit | is.eofbit);
return;
}
CharT x,y,z;
is >> real >> x >> user >> y >> system >> z;
if (!is.good() || (x != ';')|| (y != ';')|| (z != '}'))
{
is.setstate(is.failbit);
}
}
};
}
template <class Rep1, class Rep2>
struct common_type<
chrono::process_times<Rep1>,
chrono::process_times<Rep2>
>
{
typedef chrono::process_times<typename common_type<Rep1, Rep2>::type> type;
};
template <class Rep1, class Rep2>
struct common_type<
chrono::process_times<Rep1>,
Rep2
>
{
typedef chrono::process_times<typename common_type<Rep1, Rep2>::type> type;
};
template <class Rep1, class Rep2>
struct common_type<
Rep1,
chrono::process_times<Rep2>
>
{
typedef chrono::process_times<typename common_type<Rep1, Rep2>::type> type;
};
namespace chrono
{
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
bool
operator==(const duration<process_times<Rep1>, Period1>& lhs,
const duration<process_times<Rep2>, Period2>& rhs)
{
return boost::chrono::detail::duration_eq<
duration<Rep1, Period1>, duration<Rep2, Period2>
>()(duration<Rep1, Period1>(lhs.count().real), duration<Rep2, Period2>(rhs.count().real));
}
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
bool
operator==(const duration<process_times<Rep1>, Period1>& lhs,
const duration<Rep2, Period2>& rhs)
{
return boost::chrono::detail::duration_eq<
duration<Rep1, Period1>, duration<Rep2, Period2> >()(duration<Rep1, Period1>(lhs.count().real), rhs);
}
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
bool
operator==(const duration<Rep1, Period1>& lhs,
const duration<process_times<Rep2>, Period2>& rhs)
{
return rhs == lhs;
}
// Duration <
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
bool
operator< (const duration<process_times<Rep1>, Period1>& lhs,
const duration<Rep2, Period2>& rhs)
{
return boost::chrono::detail::duration_lt<
duration<Rep1, Period1>, duration<Rep2, Period2> >()(duration<Rep1, Period1>(lhs.count().real), rhs);
}
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
bool
operator< (const duration<Rep1, Period1>& lhs,
const duration<process_times<Rep2>, Period2>& rhs)
{
return boost::chrono::detail::duration_lt<
duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, duration<Rep2, Period2>(rhs.count().real));
}
template <class Rep1, class Period1, class Rep2, class Period2>
inline BOOST_CONSTEXPR
bool
operator< (const duration<process_times<Rep1>, Period1>& lhs,
const duration<process_times<Rep2>, Period2>& rhs)
{
return boost::chrono::detail::duration_lt<
duration<Rep1, Period1>, duration<Rep2, Period2>
>()(duration<Rep1, Period1>(lhs.count().real), duration<Rep2, Period2>(rhs.count().real));
}
typedef process_times<nanoseconds::rep> process_cpu_clock_times;
#if ! BOOST_OS_WINDOWS || BOOST_PLAT_WINDOWS_DESKTOP
class BOOST_CHRONO_DECL process_cpu_clock
{
public:
typedef process_cpu_clock_times times;
typedef boost::chrono::duration<times, nano> duration;
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<process_cpu_clock> time_point;
BOOST_STATIC_CONSTEXPR bool is_steady = true;
static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT;
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
static BOOST_CHRONO_INLINE time_point now(system::error_code & ec );
#endif
};
#endif
template <class CharT, class Traits, typename Rep>
std::basic_ostream<CharT, Traits>&
operator<<(std::basic_ostream<CharT, Traits>& os,
process_times<Rep> const& rhs)
{
rhs.print(os);
return os;
}
template <class CharT, class Traits, typename Rep>
std::basic_istream<CharT, Traits>&
operator>>(std::basic_istream<CharT, Traits>& is,
process_times<Rep>& rhs)
{
rhs.read(is);
return is;
}
template <typename Rep>
struct duration_values<process_times<Rep> >
{
typedef process_times<Rep> Res;
public:
static Res zero()
{
return Res();
}
static Res max BOOST_PREVENT_MACRO_SUBSTITUTION ()
{
return Res((std::numeric_limits<Rep>::max)(),
(std::numeric_limits<Rep>::max)(),
(std::numeric_limits<Rep>::max)());
}
static Res min BOOST_PREVENT_MACRO_SUBSTITUTION ()
{
return Res((std::numeric_limits<Rep>::min)(),
(std::numeric_limits<Rep>::min)(),
(std::numeric_limits<Rep>::min)());
}
};
template<class CharT>
struct clock_string<process_real_cpu_clock, CharT>
{
static std::basic_string<CharT> name()
{
static const CharT
u[] =
{ 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'r', 'e', 'a', 'l', '_', 'c', 'l', 'o', 'c', 'k' };
static const std::basic_string<CharT> str(u, u + sizeof(u)
/ sizeof(u[0]));
return str;
}
static std::basic_string<CharT> since()
{
const CharT
u[] =
{ ' ', 's', 'i', 'n', 'c', 'e', ' ', 'p', 'r', 'o', 'c', 'e', 's', 's', ' ', 's', 't', 'a', 'r', 't', '-', 'u', 'p' };
const std::basic_string<CharT> str(u, u + sizeof(u) / sizeof(u[0]));
return str;
}
};
#if ! BOOST_OS_WINDOWS || BOOST_PLAT_WINDOWS_DESKTOP
template<class CharT>
struct clock_string<process_user_cpu_clock, CharT>
{
static std::basic_string<CharT> name()
{
static const CharT
u[] =
{ 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'u', 's', 'e', 'r', '_', 'c', 'l', 'o', 'c', 'k' };
static const std::basic_string<CharT> str(u, u + sizeof(u)
/ sizeof(u[0]));
return str;
}
static std::basic_string<CharT> since()
{
const CharT
u[] =
{ ' ', 's', 'i', 'n', 'c', 'e', ' ', 'p', 'r', 'o', 'c', 'e', 's', 's', ' ', 's', 't', 'a', 'r', 't', '-', 'u', 'p' };
const std::basic_string<CharT> str(u, u + sizeof(u) / sizeof(u[0]));
return str;
}
};
template<class CharT>
struct clock_string<process_system_cpu_clock, CharT>
{
static std::basic_string<CharT> name()
{
static const CharT
u[] =
{ 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 's', 'y', 's', 't', 'e', 'm', '_', 'c', 'l', 'o', 'c', 'k' };
static const std::basic_string<CharT> str(u, u + sizeof(u)
/ sizeof(u[0]));
return str;
}
static std::basic_string<CharT> since()
{
const CharT
u[] =
{ ' ', 's', 'i', 'n', 'c', 'e', ' ', 'p', 'r', 'o', 'c', 'e', 's', 's', ' ', 's', 't', 'a', 'r', 't', '-', 'u', 'p' };
const std::basic_string<CharT> str(u, u + sizeof(u) / sizeof(u[0]));
return str;
}
};
template<class CharT>
struct clock_string<process_cpu_clock, CharT>
{
static std::basic_string<CharT> name()
{
static const CharT u[] =
{ 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'c', 'l', 'o', 'c', 'k' };
static const std::basic_string<CharT> str(u, u + sizeof(u)
/ sizeof(u[0]));
return str;
}
static std::basic_string<CharT> since()
{
const CharT
u[] =
{ ' ', 's', 'i', 'n', 'c', 'e', ' ', 'p', 'r', 'o', 'c', 'e', 's', 's', ' ', 's', 't', 'a', 'r', 't', '-', 'u', 'p' };
const std::basic_string<CharT> str(u, u + sizeof(u) / sizeof(u[0]));
return str;
}
};
#endif
} // namespace chrono
} // namespace boost
namespace std {
template <typename Rep>
struct numeric_limits<boost::chrono::process_times<Rep> >
{
typedef boost::chrono::process_times<Rep> Res;
public:
static const bool is_specialized = true;
static Res min BOOST_PREVENT_MACRO_SUBSTITUTION ()
{
return Res((std::numeric_limits<Rep>::min)(),
(std::numeric_limits<Rep>::min)(),
(std::numeric_limits<Rep>::min)());
}
static Res max BOOST_PREVENT_MACRO_SUBSTITUTION ()
{
return Res((std::numeric_limits<Rep>::max)(),
(std::numeric_limits<Rep>::max)(),
(std::numeric_limits<Rep>::max)());
}
static Res lowest() BOOST_NOEXCEPT_OR_NOTHROW
{
return (min)();
}
static const int digits = std::numeric_limits<Rep>::digits+
std::numeric_limits<Rep>::digits+
std::numeric_limits<Rep>::digits;
static const int digits10 = std::numeric_limits<Rep>::digits10+
std::numeric_limits<Rep>::digits10+
std::numeric_limits<Rep>::digits10;
static const bool is_signed = Rep::is_signed;
static const bool is_integer = Rep::is_integer;
static const bool is_exact = Rep::is_exact;
static const int radix = 0;
//~ static Res epsilon() throw() { return 0; }
//~ static Res round_error() throw() { return 0; }
//~ static const int min_exponent = 0;
//~ static const int min_exponent10 = 0;
//~ static const int max_exponent = 0;
//~ static const int max_exponent10 = 0;
//~ static const bool has_infinity = false;
//~ static const bool has_quiet_NaN = false;
//~ static const bool has_signaling_NaN = false;
//~ static const float_denorm_style has_denorm = denorm_absent;
//~ static const bool has_denorm_loss = false;
//~ static Res infinity() throw() { return 0; }
//~ static Res quiet_NaN() throw() { return 0; }
//~ static Res signaling_NaN() throw() { return 0; }
//~ static Res denorm_min() throw() { return 0; }
//~ static const bool is_iec559 = false;
//~ static const bool is_bounded = true;
//~ static const bool is_modulo = false;
//~ static const bool traps = false;
//~ static const bool tinyness_before = false;
//~ static const float_round_style round_style = round_toward_zero;
};
}
#ifndef BOOST_CHRONO_HEADER_ONLY
#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
#else
#include <boost/chrono/detail/inlined/process_cpu_clocks.hpp>
#endif
#endif
#endif // BOOST_CHRONO_PROCESS_CPU_CLOCKS_HPP

Some files were not shown because too many files have changed in this diff Show More