GetServerTickRate: Difference between revisions
From Onset Developer Wiki
No edit summary |
FlyingFork (talk | contribs) No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Info|Function|Server|1.0}} | {{Info|Function|Server|1.0}} | ||
{{FuncDescription|Tick rate of the main thread. The rate is variable and depends on the load of the server. For an empty server this is between 500Hz and 1000Hz. For | {{FuncDescription|Tick rate of the main thread. The rate is variable and depends on the load of the server. For an empty server this is between 500Hz and 1000Hz. For 300 concurrent players the tick rate should be above 150Hz.}} | ||
{{FuncSyntax|GetServerTickRate()}} | {{FuncSyntax|GetServerTickRate()}} | ||
Line 11: | Line 11: | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua> | |||
local serverTick = GetServerTickRate() | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
*[[GetServerTickRate]] | |||
*[[ServerExit]] | |||
*[[SetServerName]] | |||
*[[GetServerName]] | |||
*[[GetMaxPlayers]] |
Latest revision as of 14:18, 26 June 2021
Description
Tick rate of the main thread. The rate is variable and depends on the load of the server. For an empty server this is between 500Hz and 1000Hz. For 300 concurrent players the tick rate should be above 150Hz.
Syntax
GetServerTickRate()
Parameters
- This function has no parameters.
Return Value
- Returns a float of the tick rate.
Example
local serverTick = GetServerTickRate()