acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
aaa_microsecond.h
1//
2// Refactored/Merged by camilon on 2021-10-04 06:45 BRT <3ThomasBorregaardSorensen!![ THE ONE GOD ]
3// Created by camilo on 2020-11-16. <3TBS_ [ THE ONLY ] [ THE GOD ] [ THE MAN ]
4//
5#pragma once
6
7
8class CLASS_DECL_ACME microsecond :
9 public duration
10{
11public:
12
13
14 using duration::duration;
15
16 microsecond() : duration(e_raw, 0, 1'000) {}
17 microsecond(const class ::time & time) : ::duration(duration) {}
18 template < prototype_integral INTEGRAL >
19 microsecond(INTEGRAL integral) : duration(::integral_microsecond(integral)) { }
20 template < prototype_floating FLOATING >
21 microsecond(FLOATING floating) : duration(::floating_microsecond(floating)) { }
22
23
24 bool done() const { return integral_microsecond().m_i >= 1; }
25
26
27};
28
29
30//inline ::microsecond first_microsecond() { return ::duration::first(); }
31inline ::microsecond get_microsecond() { return ::duration::now(); }
32
33
34
Definition aaa_time.h:13