acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
aaa_second.h
1//
2// Created by camilo on 2021-10-05 12:41 BRT <3ThomasBorregaardSorensen!![ THE ONE GOD ]
3//
4//
5//
6//class CLASS_DECL_ACME floating_second_t :
7// public floating_second
8//{
9//public:
10//
11//
12// using BASE_TYPE = floating_second;
13//
14//
15// constexpr floating_second_t(floating_second second = {}) : floating_second(second) {}
16// floating_second_t(const class time & time);
17//
18// integral_second integral_seconds() const { return (integral_second)((::i64) m_f64); }
19// integral_nanosecond integral_nanoseconds() const { return (integral_nanosecond)((::i64) (fmod(m_f64, 1.0) * 1'000'000'000.0)); }
20//
21//
22//};
23//
24//
25//using floating_second = floating_time < floating_second_t >;
26
27//
28//constexpr floating_second operator""_s(::f128 d) { return (floating_second)d; }
29
30
31inline floating_second get_floating_second() { return floating_second(get_floating_nanosecond().m_f64 / 1'000'000'000.0); }
32
33
34
35template < >
36inline floating_second now<floating_second>()
37{
38
39 return get_floating_second();
40
41}
42
43
44
45
46
47