diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-11-03 21:02:31 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-11-03 21:02:31 -0700 |
commit | 0e0f36f8b4a57bd9a13925c9f7e92f7bd8c59a81 (patch) | |
tree | a4fc9dc7350d4d5d4d5f4ec8d4a2cbe96c400db0 /edit.lua | |
parent | d1dd3e441f35a2f54b699e7a3a1874a4788f8ed5 (diff) | |
download | text.love-0e0f36f8b4a57bd9a13925c9f7e92f7bd8c59a81.tar.gz |
stop tracking wallclock time
We only need time differences.
Diffstat (limited to 'edit.lua')
-rw-r--r-- | edit.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/edit.lua b/edit.lua index 3c722a7..db276a7 100644 --- a/edit.lua +++ b/edit.lua @@ -176,7 +176,7 @@ end function edit.update(State, dt) Drawing.update(State, dt) - if State.next_save and State.next_save < App.getTime() then + if State.next_save and State.next_save < Current_time then save_to_disk(State) State.next_save = nil end @@ -184,7 +184,7 @@ end function schedule_save(State) if State.next_save == nil then - State.next_save = App.getTime() + 3 -- short enough that you're likely to still remember what you did + State.next_save = Current_time + 3 -- short enough that you're likely to still remember what you did end end |