Time Shield Library
C++ library for working with time
Loading...
Searching...
No Matches
time_utils.mqh File Reference

Header with time-related utility functions. More...

Go to the source code of this file.

Namespaces

namespace  time_shield
 Main namespace for the Time Shield library.
 

Macros

#define __TIME_SHIELD_TIME_UTILS_MQH__
 

Functions

long time_shield::microseconds ()
 Get the number of microseconds since the UNIX epoch.
 
long time_shield::ns_of_sec ()
 Get the nanosecond part of the current second.
 
int time_shield::us_of_sec ()
 Get the microsecond part of the current second.
 
int time_shield::ms_of_sec ()
 Get the millisecond part of the current second.
 
const ts_t time_shield::ts () noexcept
 Get the current UTC timestamp in seconds.
 
const ts_t time_shield::timestamp () noexcept
 Get the current UTC timestamp in seconds.
 
const fts_t time_shield::fts () noexcept
 Get the current UTC timestamp in floating-point seconds.
 
const fts_t time_shield::ftimestamp () noexcept
 Get the current UTC timestamp in floating-point seconds.
 
const ts_ms_t time_shield::ts_ms () noexcept
 Get the current UTC timestamp in milliseconds.
 
const ts_ms_t time_shield::timestamp_ms () noexcept
 Get the current UTC timestamp in milliseconds.
 
const ts_ms_t time_shield::now () noexcept
 Get the current UTC timestamp in milliseconds.
 
const ts_us_t time_shield::ts_us () noexcept
 Get the current UTC timestamp in microseconds.
 
const ts_us_t time_shield::timestamp_us () noexcept
 Get the current UTC timestamp in microseconds.
 

Detailed Description

Header with time-related utility functions.

This file contains various helper functions used for obtaining the current timestamp in different formats and extracting sub-second components in MQL5.

Definition in file time_utils.mqh.

Macro Definition Documentation

◆ __TIME_SHIELD_TIME_UTILS_MQH__

#define __TIME_SHIELD_TIME_UTILS_MQH__

Definition at line 8 of file time_utils.mqh.