Refactor API functions to improve parameter aliasing and enhance documentation clarity

This commit is contained in:
2025-05-18 15:12:37 +02:00
parent cbed6108ef
commit b5cba11bd3
10 changed files with 95 additions and 99 deletions

View File

@@ -1,9 +1,9 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param function function
---@param includeSubroutines boolean
---@return number usage
---@return number calls
---@param func function
---@param includeSubroutines boolean #True to include time spent in other functions called by the given function; false to count only time spent in the function body (boolean)
---@return number usage #Amount of CPU time used by the function (in milliseconds) since the UI was loaded or ResetCPUUsage() was last called (number)
---@return number calls #Number of times the function has been called (number)
---Returns information about CPU usage by a function. Only returns valid data if the scriptProfile CVar is set to 1; returns 0 otherwise.
function GetFunctionCPUUsage(function, includeSubroutines) end
function GetFunctionCPUUsage(func, includeSubroutines) end