Garry's Mod Wiki

Garry's Mod Wiki

  number physenv.GetLastSimulationTime()

Description

Returns the last simulation duration of the in-game physics.

Returns

1 number
The last simulation duration of the in-game physics in seconds

Example

Prints a message when physics lag of over 100ms is detected

hook.Add("Think", "LagDetector", function () if physenv.GetLastSimulationTime() * 1000 > 100 then print("Physics lag detected!") end end)

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...