|
DUDS
|
Distributed Update of Data from Something
|
Holds Interstellar Time down to seconds in fields that increase by a power of 1000, three decimal digits each, up to a gigaseconds field. More...
#include <Metricform.hpp>
Public Member Functions | |
| Metricform ()=default | |
| Default constructor. More... | |
| template<class Rep , class Period > | |
| Metricform (const std::chrono::duration< Rep, Period > &d) | |
| Constructs a Metricform with the duration contained in d truncated to seconds. More... | |
| template<class Clock , class Duration > | |
| Metricform (const std::chrono::time_point< Clock, Duration > &t) | |
| Constructs a Metricform with the time contained in t truncated to seconds. More... | |
| template<class Duration > | |
| void | setDuration (const Duration &d) |
| Sets the stored time to be the same as the time given truncated to seconds. More... | |
| template<class Time > | |
| void | setTime (const Time &d) |
| template<class Int > | |
| void | setToSeconds (Int t) |
| Sets the stored time to be the same as the time given. More... | |
Public Attributes | |
| unsigned int | G: 32 |
| Gigaseconds field. More... | |
| unsigned int | k: 10 |
| Kiloseconds field. More... | |
| unsigned int | M: 10 |
| Megaseconds field. More... | |
| unsigned int | neg: 1 |
| The negative flag. More... | |
| unsigned int | s: 10 |
| Seconds field. More... | |
Holds Interstellar Time down to seconds in fields that increase by a power of 1000, three decimal digits each, up to a gigaseconds field.
The size of these fields jumps by large bounds compared to common systems of time and date used on Earth, which may make this form less desirable for use than Hectoform, but its fields all use proper metric prefixes.
Definition at line 23 of file Metricform.hpp.
|
default |
Default constructor.
|
inline |
Constructs a Metricform with the duration contained in d truncated to seconds.
| Duration | A time duration class related to std::chrono::duration. |
| d | The duration. |
Definition at line 63 of file Metricform.hpp.
|
inline |
Constructs a Metricform with the time contained in t truncated to seconds.
| Clock | A clock class, such as FemtoClock. |
| t | The time. |
Definition at line 73 of file Metricform.hpp.
|
inline |
Sets the stored time to be the same as the time given truncated to seconds.
| Duration | A time duration class related to std::chrono::duration. |
| d | The duration. |
Definition at line 107 of file Metricform.hpp.
Referenced by Metricform().
|
inline |
Definition at line 113 of file Metricform.hpp.
Referenced by Metricform().
|
inline |
Sets the stored time to be the same as the time given.
| Int | An integer type or something that acts like an integer. |
| t | The time in seconds. |
Definition at line 82 of file Metricform.hpp.
Referenced by setDuration(), and setTime().
| unsigned int duds::time::interstellar::Metricform::G |
Gigaseconds field.
One unit in regular old Earth time is: 31 years, 251 days, 13 hours, 21 minutes, and 28 seconds.
Definition at line 29 of file Metricform.hpp.
Referenced by duds::time::interstellar::operator<<(), and setToSeconds().
| unsigned int duds::time::interstellar::Metricform::k |
Kiloseconds field.
One unit in regular old Earth time is: 16 minutes and 40 seconds.
Definition at line 41 of file Metricform.hpp.
Referenced by duds::time::interstellar::operator<<(), and setToSeconds().
| unsigned int duds::time::interstellar::Metricform::M |
Megaseconds field.
One unit in regular old Earth time is: 11 days, 13 hours, 46 minutes, and 40 seconds.
Definition at line 35 of file Metricform.hpp.
Referenced by duds::time::interstellar::operator<<(), and setToSeconds().
| unsigned int duds::time::interstellar::Metricform::neg |
The negative flag.
It doesn't make sense to have every number in this struct be negative for a negative time, and integers cannot be negative zero, so this flag is used instead.
Definition at line 51 of file Metricform.hpp.
Referenced by duds::time::interstellar::operator<<(), and setToSeconds().
| unsigned int duds::time::interstellar::Metricform::s |
Seconds field.
Definition at line 45 of file Metricform.hpp.
Referenced by duds::time::interstellar::operator<<(), and setToSeconds().