Patent ID: 11921613
Assignee: MICROSOFT TECHNOLOGY LICENSING, LLC
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 6:
7. The method of claim 1, further comprising:
determining that the function comprises an asynchronous function, wherein the asynchronous function comprises a plurality of code sections, wherein the asynchronous function is associated with a state machine variable that stores a value associated with a next code section to execute, and wherein the asynchronous function is iteratively re-entered to execute a code section of the plurality of code sections identified by the state machine variable;
inserting instructions that, while executing an initial code section of the plurality of code sections, store, in the state machine variable, a reference to an entry in a data structure that contains the first current system time and a state machine value;
wherein the instructions inserted before the return statement instruction of the function further include instructions configured to:
retrieve the first current system time from the entry in the data structure referenced by the state machine variable,
compute a second elapsed execution time by subtracting the first current system time from a third current system time, and
output the second elapsed execution time.