Class perf
Code execution time measurement with high precision (API QueryPerformanceCounter).
public static class perf
Namespace: Au
Assembly: Au.dll
Properties
Name | Description |
---|---|
incremental | If |
mcs | Gets the number of microseconds elapsed since Windows startup. Uses the high-resolution system timer (API QueryPerformanceCounter). |
ms | Gets the number of milliseconds elapsed since Windows startup. Uses the high-resolution system timer (API QueryPerformanceCounter). |
shared | Gets a reference to a perf.Instance variable in shared memory. |
timeTotal | Gets the number of microseconds between perf.first and the last perf.next. |
Methods
Name | Description |
---|---|
cpu(int) | Executes some code in loop for the specified amount of time. It should make CPU to run at full speed. |
first() | Stores current time in the first element of an internal array. |
local() | Creates and returns new perf.Instance variable and calls its perf.Instance.First. |
next(char) | Stores current time in next element of an internal array. |
nw(char) | Calls perf.next and perf.write. |
toArray() | Return array of time values collected by calling perf.first and perf.next. Each element is the number of microseconds of each code execution between calling First and each Next. |
toString() | Formats a string from time values collected by calling perf.first and perf.next. The string contains the number of microseconds of each code execution between calling First and each Next. |
write() | Formats a string from time values collected by calling perf.first and perf.next, and shows it in the output. The string contains the number of microseconds of each code execution between calling First and each Next. |