Returns information about the CPU usage of an event. Only returns valid data if the scriptProfile CVar is set to 1; returns 0 otherwise.

See also Debugging and Profiling functions.


usage, numEvents = GetEventCPUUsage(["event"])


  • event - Name of an event; if omitted, returns usage information for all events (string)


  • usage - Amount of CPU time used by handlers for the event (in milliseconds) since the UI was loaded or ResetCPUUsage() was last called (number)
  • numEvents - Number of times the event has fired this session (number)