Skip to content

Commit

Permalink
tickRate function
Browse files Browse the repository at this point in the history
  • Loading branch information
Astralcircle committed Dec 13, 2024
1 parent 3350456 commit c69087e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/entities/gmod_wire_expression2/core/serverinfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,7 @@ end
e2function number tickInterval()
return engine.TickInterval()
end

e2function number tickRate()
return 1 / engine.AbsoluteFrameTime()
end
1 change: 1 addition & 0 deletions lua/wire/client/e2descriptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ E2Helper.Descriptions["printCaption(sn)"] = "Emits a closed caption with the pro
-- Time
E2Helper.Descriptions["tickClk()"] = "DEPRECATED. Use 'event tick()' instead! Returns 1 if the current execution was caused by \"runOnTick\""
E2Helper.Descriptions["tickInterval()"] = "Returns the time (in seconds) between each server tick"
E2Helper.Descriptions["tickRate()"] = "Returns the current server tickrate. Allows detecting lags"
E2Helper.Descriptions["curtime()"] = "Returns the current game time since server-start in seconds"
E2Helper.Descriptions["realtime()"] = "Returns the current real time since server-start in seconds"
E2Helper.Descriptions["systime()"] = "Returns a highly accurate time (also in seconds) since the server was started. Ideal for benchmarking"
Expand Down

0 comments on commit c69087e

Please sign in to comment.