Time Shield Library
C++ library for working with time
|
Version: 1.0.1
The Time Shield Library is a comprehensive C++ library designed for time manipulation, formatting, and conversion. It was built for practical and engineering tasks, especially in constrained or performance-critical environments.
Unlike std::chrono
or more academic libraries like HowardHinnant/date
, Time Shield is designed to be simple, portable, and suitable for scenarios like logging, serialization, MQL5 usage, and date/time formatting.
int64_t
, double
) like ts_t
, fts_t
for timestamps — easy to serialize and store.<cstdint>
.NtpClient
) are isolated and optional.Here is a simple demonstration:
Additional example files are located in the examples/
folder:
time_utils_example.cpp
— get timestamps and partstime_formatting_example.cpp
— to_string, ISO8601, MQL5time_parser_example.cpp
— parse ISO8601time_conversions_example.cpp
— convert between formatstime_zone_conversions_example.cpp
— CET/EET ↔ GMTntp_client_example.cpp
— NTP sync (Windows-only)Time Shield is a header-only library. To use it in your C++ project:
include/time_shield_cpp
folder to your project's include paths.No additional build steps or external dependencies are required.
For MQL5/MetaTrader:
install_mql5.bat
to copy the necessary .mqh
files to your MQL5 include directory.To build the C++ examples:
build-examples.bat
to compile example programs with MSVC or your preferred toolchain.Time Shield Library GitHub repository
This library is licensed under the MIT License. See the LICENSE file for more details.