acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
_impl.h
1
#pragma once
2
3
4
//inline time& time::operator = (const class ::nanosecond & nanosecond)
5
//{
6
//
7
// m_iSecond = nanosecond.m_i32 / 1'000'000'000;
8
//
9
// m_iNanosecond = nanosecond.m_i32 % 1'000'000'000;
10
//
11
// return *this;
12
//
13
//}
14
15
16
//inline time& time::operator = (const class ::microsecond & microsecond)
17
//{
18
//
19
// m_secs = microsecond.m_i32 / 1'000'000;
20
//
21
// m_nanos = (microsecond.m_i32 % 1'000'000) * 1'000;
22
//
23
// return *this;
24
//
25
//}
26
//
27
28
//inline time& time::operator = (const class ::time & class ::time)
29
//{
30
//
31
// m_secs = class ::time.m_i32 / 1'000;
32
//
33
// m_nanos = (class ::time.m_i32 % 1'000) * 1'000'000;
34
//
35
// return *this;
36
//
37
//}
38
39
40
//inline time& time::operator = (const class ::second & second)
41
//{
42
//
43
// m_secs = second;
44
//
45
// m_nanos = 0;
46
//
47
// return *this;
48
//
49
//}
50
51
52
53
//
54
//inline nanosecond operator -(const ::nanosecond& nanosecond, const class time & time)
55
//{
56
//
57
// return nanosecond.m_i32 - class ::time.m_i32 * 1'000'000;
58
//
59
//}
60
//
61
//
62
//inline time operator -(const class time & time, const class time & time)
63
//{
64
//
65
// return time - (const class ::time &) class ::time;
66
//
67
//}
68
//
69
70
71
//
72
//inline bool time::timeout(const class time & time)
73
//{
74
//
75
// auto now = this->now();
76
//
77
// if (elapsed(now) < time)
78
// {
79
//
80
// return false;
81
//
82
// }
83
//
84
// operator =(now);
85
//
86
// return true;
87
//
88
//}
89
//
90
//
91
//class ::time time::remaining(const class time & time, const class time & timeNow)
92
//{
93
//
94
// auto timeRemaining = time - elapsed(timeNow);
95
//
96
// return timeRemaining;
97
//
98
//}
99
//
100
//
101
102
103
namespace
earth
104
{
105
106
107
108
constexpr ::std::strong_ordering time_span::operator <=>(
const
class ::time &
time
)
const
109
{
110
111
return
m_iSecond <=> time.integral_second();
112
113
}
114
115
116
constexpr
earth::time time::operator +(class ::time&
time
)
const
117
{
118
119
return
{ posix_time({ posix_time_t {}, this->m_iSecond + time.m_iSecond }) };
120
121
}
122
123
}
// namespace earth
124
125
126
127
128
129
130
earth::time
Definition
earth_time.h:33
prototype
datetime
_impl.h
Generated by
1.17.0