Time Shield Library
C++ library for working with time
Toggle main menu visibility
Loading...
Searching...
No Matches
time_struct.mqh
Go to the documentation of this file.
1
//+------------------------------------------------------------------+
2
//| time_struct.mqh |
3
//| Time Shield - MQL5 Time Structure |
4
//| Copyright 2025, NewYaroslav |
5
//| https://github.com/NewYaroslav/time-shield-cpp |
6
//+------------------------------------------------------------------+
7
#ifndef TIME_SHIELD_MQL5_HEADER_TIME_SHIELD_TIME_STRUCT_MQH_INCLUDED
8
#define TIME_SHIELD_MQL5_HEADER_TIME_SHIELD_TIME_STRUCT_MQH_INCLUDED
9
17
18
#property copyright "Copyright 2025, NewYaroslav"
19
#property link "https://github.com/NewYaroslav/time-shield-cpp"
20
#property strict
21
22
namespace
time_shield
{
23
26
struct
TimeStruct
{
27
int
hour
;
28
int
min
;
29
int
sec
;
30
int
ms
;
31
};
32
40
TimeStruct
create_time_struct
(
41
const
int
hour,
42
const
int
min,
43
const
int
sec = 0,
44
const
int
ms = 0) {
45
TimeStruct
result;
46
result.hour = hour;
47
result.min = min;
48
result.sec = sec;
49
result.ms = ms;
50
return
result;
51
}
52
53
};
// namespace time_shield
54
55
#endif
// TIME_SHIELD_MQL5_HEADER_TIME_SHIELD_TIME_STRUCT_MQH_INCLUDED
time_shield::create_time_struct
const TimeStruct create_time_struct(int16_t hour, int16_t min, int16_t sec=0, int16_t ms=0)
Creates a TimeStruct instance.
Definition
time_struct.hpp:29
time_shield
Main namespace for the Time Shield library.
time_shield::TimeStruct
Structure to represent time.
Definition
time_struct.hpp:15
time_shield::TimeStruct::ms
int16_t ms
Millisecond component of time (0-999).
Definition
time_struct.hpp:19
time_shield::TimeStruct::hour
int16_t hour
Hour component of time (0-23).
Definition
time_struct.hpp:16
time_shield::TimeStruct::sec
int16_t sec
Second component of time (0-59).
Definition
time_struct.hpp:18
time_shield::TimeStruct::min
int16_t min
Minute component of time (0-59).
Definition
time_struct.hpp:17
MQL5
Include
time_shield
time_struct.mqh
Generated by
1.17.0