Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tickRealInterval function #3218

Merged
merged 3 commits into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()
Astralcircle marked this conversation as resolved.
Show resolved Hide resolved
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
Loading