Time Shield Library
C++ library for working with time
Loading...
Searching...
No Matches
time_struct.hpp
Go to the documentation of this file.
1#pragma once
6#ifndef _TIME_SHIELD_TIME_STRUCT_HPP_INCLUDED
7#define _TIME_SHIELD_TIME_STRUCT_HPP_INCLUDED
8
9namespace time_shield {
10
12 struct TimeStruct {
13 int hour;
14 int min;
15 int sec;
16 int ms;
17 };
18
26 const int& hour,
27 const int& min,
28 const int& sec = 0,
29 const int& ms = 0) {
30 TimeStruct data{hour, min, sec, ms};
31 return data;
32 }
33
34}; // namespace time_shield
35
36#endif // _TIME_SHIELD_TIME_STRUCT_HPP_INCLUDED
Main namespace for the Time Shield library.
Definition constants.hpp:12
const TimeStruct create_time_struct(const int &hour, const int &min, const int &sec=0, const int &ms=0)
Creates a TimeStruct instance.
Structure to represent time.
int ms
Millisecond component of time (0-999)
int sec
Second component of time (0-59)
int hour
Hour component of time (0-23)
int min
Minute component of time (0-59)