summary refs log tree commit diff
path: root/src/Time.hpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-04-09 03:29:14 +0200
committerMel <einebeere@gmail.com>2024-04-09 03:29:14 +0200
commit2ab9e650f814d47e78fc95500605b4561922893d (patch)
tree1850dcdd1e198d8ca77b2677b5f1721757e16441 /src/Time.hpp
parent15237a469afe1fd6a6958466bae761ec68b647dc (diff)
downloadmeowcraft-2ab9e650f814d47e78fc95500605b4561922893d.tar.zst
meowcraft-2ab9e650f814d47e78fc95500605b4561922893d.zip
Add FPS limiting for render thread
Diffstat (limited to 'src/Time.hpp')
-rw-r--r--src/Time.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Time.hpp b/src/Time.hpp
index 64ab4a2..62e2809 100644
--- a/src/Time.hpp
+++ b/src/Time.hpp
@@ -7,8 +7,10 @@ namespace MC {
 
 class Time {
 public:
+    // TODO: Document exact units of types.
     using Timestamp = U64;
     using Tick = U64;
+    // TODO: Create `Time::Duration` type.
 
     Time() = default;
 
@@ -23,7 +25,12 @@ public:
     // This is the same as total_frames(), but is more descriptive, sometimes.
     // :)
     PURE Tick tick() const;
+    // The time in seconds that has passed since the last frame.
+    // This is always a value between `0.001` and `0.1`.
     PURE Real delta() const;
+    // The time in seconds that has passed since the last frame.
+    // Unlike `delta()`, this value is not clamped, and can be any positive value.
+    PURE Real delta_raw() const;
 
     PURE Timestamp frame_start() const;