RBX docs Docs Idk

Timing Methods

Below is a graph detailing when to use which time measurement functions:

MethodResolutionRuns backwardsRelative toCostLags if simulation lags1:1 real timeConstant during frameUsage
os.clock()1 µsNoNothingCheap, maybe a touch slowerNoYesNoHigh precision micro profile
os.time()1 secondNoUNIX EpochCheapNoYesNoGet real UNIX timestamp
tick()1 µs - sometimes?YesUNIX Epoch (Sometimes)CheapNoYesNoDon’t use, prefer os.clock()
workspace.DistributedGameTime1/60NoOn game startRequires reflection?YesNoYesDon’t use
time()1/??NoOn game startCheapYesNoYesFor consistent simulation step
RunService.Heartbeat(dt)1/240NoN/AExpensiveish, given in a loopYesNoYesEquivalent to time()?
RunService.Stepped(time, dt)1/241Notime is “On game start”Expensiveish, given in a loopYesNoYesEquivalent to time()?

Source