Difference between revisions of "Lua:getCPUCount"
Jump to navigation
Jump to search
(Created page with 'Category:Lua '''function''' getCPUCount() Returns the number of CPU's. {{LuaFunctionParametersNone}} == Examples == <pre> getCPUCount() </pre> {{LuaSeeAlso}} === Related…') |
|||
| Line 1: | Line 1: | ||
[[Category:Lua]] | [[Category:Lua]] | ||
| − | '''function''' getCPUCount() | + | {{CodeBox|'''function''' getCPUCount() ''':''' integer}} |
| − | Returns the number of | + | Returns the number of CPUs. |
| − | + | ===Function Parameters=== | |
| + | This function has no parameters. | ||
| − | == Examples == | + | ===Returns=== |
| + | integer — The number of CPUs. | ||
| + | |||
| + | ===Examples=== | ||
<pre> | <pre> | ||
| − | getCPUCount() | + | local cpuCount = getCPUCount() |
| + | |||
| + | print("CPU count: " .. cpuCount) | ||
</pre> | </pre> | ||
{{LuaSeeAlso}} | {{LuaSeeAlso}} | ||
| − | |||
| − | |||
| − | |||
Revision as of 04:48, 21 June 2026
Returns the number of CPUs.
Function Parameters
This function has no parameters.
Returns
integer — The number of CPUs.
Examples
local cpuCount = getCPUCount()
print("CPU count: " .. cpuCount)