summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/Stardate.h
diff options
context:
space:
mode:
Diffstat (limited to 'StarsEx/Stardate.h')
-rw-r--r--StarsEx/Stardate.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/StarsEx/Stardate.h b/StarsEx/Stardate.h
new file mode 100644
index 0000000..cc696c8
--- /dev/null
+++ b/StarsEx/Stardate.h
@@ -0,0 +1,43 @@
+/* Starshatter: The Open Source Project
+ Copyright (c) 2021-2024, Starshatter: The Open Source Project Contributors
+ Copyright (c) 2011-2012, Starshatter OpenSource Distribution Contributors
+ Copyright (c) 1997-2006, Destroyer Studios LLC.
+*/
+
+#pragma once
+
+#include <Text.h>
+
+
+namespace starshatter
+{
+namespace engine
+{
+
+
+struct Stardate
+{
+ long double value = {};
+
+ Stardate();
+ Stardate(long double value_);
+
+ operator long double() const;
+
+ Text Format(bool short_format=false) const;
+};
+
+
+Stardate CurrentTime();
+Stardate OperationTime();
+Stardate MissionTime();
+
+long double Epoch();
+long double OperationStart();
+long double MissionStart();
+void SetOperationStart(long double value={}, bool relative=false);
+void SetMissionStart(long double value={}, bool relative=false);
+
+
+} // namespace engine
+} // namespace starshatter