Difference between revisions of "Lua:getCPUCount"
Jump to navigation
Jump to search
m (Added related function template.) |
|||
| Line 11: | Line 11: | ||
===Examples=== | ===Examples=== | ||
| − | < | + | <syntaxhighlight lang="lua" line> |
local cpuCount = getCPUCount() | local cpuCount = getCPUCount() | ||
print("CPU count: " .. cpuCount) | print("CPU count: " .. cpuCount) | ||
| − | </ | + | </syntaxhighlight> |
{{LuaSeeAlso}} | {{LuaSeeAlso}} | ||
| + | |||
| + | {{Threads}} | ||
Latest revision as of 20:52, 26 June 2026
Returns the number of CPUs.
Function Parameters[edit]
This function has no parameters.
Returns[edit]
integer — The number of CPUs.
Examples[edit]
1 local cpuCount = getCPUCount()
2
3 print("CPU count: " .. cpuCount)