|
DUDS
|
Distributed Update of Data from Something
|
Holds Interstellar Time down to seconds in fields that increase by a power of 100, two decimal digits each, up to a 1e10 seconds field. More...
#include <Hectoform.hpp>
Public Member Functions | |
| Hectoform ()=default | |
| Default constructor. More... | |
| template<class Rep , class Period > | |
| Hectoform (const std::chrono::duration< Rep, Period > &d) | |
| Constructs a Hectoform with the duration contained in d truncated to seconds. More... | |
| template<class Clock , class Duration > | |
| Hectoform (const std::chrono::time_point< Clock, Duration > &t) | |
| Constructs a Hectoform 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 | e10: 25 |
| 1e10 seconds field. More... | |
| unsigned int | e8: 7 |
| 1e8 seconds field. More... | |
| unsigned int | h: 7 |
| Hectoseconds field. More... | |
| unsigned int | M: 7 |
| Megaseconds field. More... | |
| unsigned int | ma: 7 |
| Myriaseconds field. More... | |
| unsigned int | neg: 1 |
| The negative flag. More... | |
| unsigned int | s: 7 |
| Seconds field. More... | |
Holds Interstellar Time down to seconds in fields that increase by a power of 100, two decimal digits each, up to a 1e10 seconds field.
The size of these fields seem to be in a better range for human use than the fields of Metricform, but there are jumps that people of Earth are not acustomed to starting with megaseconds. The field names try to use metric prefixes, but prefixes do not exist for all field sizes, and some uncommon prefixes are put to use.
Definition at line 25 of file Hectoform.hpp.
|
default |
Default constructor.
|
inline |
Constructs a Hectoform 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 78 of file Hectoform.hpp.
|
inline |
Constructs a Hectoform with the time contained in t truncated to seconds.
| Clock | A clock class, such as FemtoClock. |
| t | The time. |
Definition at line 88 of file Hectoform.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 126 of file Hectoform.hpp.
Referenced by Hectoform().
|
inline |
Definition at line 132 of file Hectoform.hpp.
Referenced by Hectoform().
|
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 97 of file Hectoform.hpp.
Referenced by setDuration(), and setTime().
| unsigned int duds::time::interstellar::Hectoform::e10 |
1e10 seconds field.
One unit in regular old Earth time is: 316 years, 324 days, 2 hours, 39 minutes, and 28 seconds.
Definition at line 31 of file Hectoform.hpp.
Referenced by duds::time::interstellar::operator<<(), and setToSeconds().
| unsigned int duds::time::interstellar::Hectoform::e8 |
1e8 seconds field.
One unit in regular old Earth time is: 3 years, 61 days, 16 hours, 19 minutes, and 4 seconds.
Definition at line 37 of file Hectoform.hpp.
Referenced by duds::time::interstellar::operator<<(), and setToSeconds().
| unsigned int duds::time::interstellar::Hectoform::h |
Hectoseconds field.
One unit in regular old Earth time is: 1 minute and 40 seconds.
Definition at line 56 of file Hectoform.hpp.
Referenced by duds::time::interstellar::operator<<(), setTime(), and setToSeconds().
| unsigned int duds::time::interstellar::Hectoform::M |
Megaseconds field.
One unit in regular old Earth time is: 11 days, 13 hours, 46 minutes, and 40 seconds.
Definition at line 43 of file Hectoform.hpp.
Referenced by duds::time::interstellar::operator<<(), and setToSeconds().
| unsigned int duds::time::interstellar::Hectoform::ma |
Myriaseconds field.
One unit in regular old Earth time is: 2 hours, 46 minutes, and 40 seconds.
Definition at line 50 of file Hectoform.hpp.
Referenced by duds::time::interstellar::operator<<(), and setToSeconds().
| unsigned int duds::time::interstellar::Hectoform::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 66 of file Hectoform.hpp.
Referenced by duds::time::interstellar::operator<<(), and setToSeconds().
| unsigned int duds::time::interstellar::Hectoform::s |
Seconds field.
Definition at line 60 of file Hectoform.hpp.
Referenced by duds::time::interstellar::operator<<(), and setToSeconds().