Method for fetching callback execution time of asynchronous request of user
A technology of asynchronous request and execution time, applied in the fields of instruments, electrical digital data processing, hardware monitoring, etc., it can solve the problem that the callback of asynchronous requests is not good, and achieve the effect of good experience and performance improvement.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0014] The present invention will be further elaborated below by means of drawings and specific embodiments. Examples will help to better understand the present invention, but the present invention is not limited only to the following examples.
[0015] As shown in the figure, the present invention is mainly based on the principle of single thread (there is only one section of execution code at the same time), when an asynchronous callback function is executed, immediately add a zero timer, and the callback in this timer will be Put it in the queue and push it into the main thread for execution immediately when the js main thread is idle, so it is guaranteed that the code in the timer will be executed immediately after the callback function code is executed. From callback execution start-callback execution-timer execution (callback end), these times are on the same line, and the end of the callback is marked by the execution of the timer, and the required time is calculated in ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


