aboutsummaryrefslogtreecommitdiff
path: root/src/client/state/state.cc
diff options
context:
space:
mode:
authorNicolas James <Eele1Ephe7uZahRie@tutanota.com>2025-02-12 21:57:46 +1100
committerNicolas James <Eele1Ephe7uZahRie@tutanota.com>2025-02-12 21:57:46 +1100
commite4483eca01b48b943cd0461e24a74ae1a3139ed4 (patch)
treeed58c3c246e3af1af337697695d780aa31f6ad9a /src/client/state/state.cc
parent1cc08c51eb4b0f95c30c0a98ad1fc5ad3459b2df (diff)
Update to most recent version (old initial commit)
Diffstat (limited to 'src/client/state/state.cc')
-rw-r--r--src/client/state/state.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/client/state/state.cc b/src/client/state/state.cc
new file mode 100644
index 0000000..2423c9a
--- /dev/null
+++ b/src/client/state/state.cc
@@ -0,0 +1,15 @@
+#include "client/state/state.hh"
+
+namespace client {
+namespace state {
+
+shared::time_duration_t get_time_per_tick() noexcept {
+ return std::chrono::microseconds(1'000'000) / tickrate;
+}
+
+bool has_initialised() noexcept {
+ return state::localplayer_index.has_value();
+}
+
+} // namespace state
+} // namespace client