InternalExecutes an asynchronous task and monitors its execution time.
Measures elapsed time from invocation until promise resolution.
The type of value returned by the task
A promise resolving to the task's return value
Executes a synchronous task and monitors its execution time.
Measures elapsed time from invocation until completion.
The type of value returned by the task
The task's return value
Executes a task (sync or async) and monitors its execution time.