How in js to determine the execution time for ajax request?

How to determine the execution time for ajax request.

For example, if the request takes longer than 5 seconds to send a message to the console.
March 20th 20 at 11:37
1 answer
March 20th 20 at 11:39
When starte Ajax request
1) to put the flag of the sending process
2) to Start a timer on EN seconds which will check the flag variable and display in the console the message if it is installed(and reset it)
3) Upon completion of the Ajax in success/don reset the flag.
4) Profit
and can you please code? - maymie_Wiegand commented on March 20th 20 at 11:42
@Ciara_Upton, There is a violation of the rules,

5. It is strictly forbidden to place on the Service:
5.12. Tasks and assignments. Unlike the issue task and the job represent a private problem situation with a clearly specified goal that must be achieved. The benefits of achieving this goal receives, as a rule, only the author. And even the author of the decision task or assignment will be useful only for short periods (as long as it does not use the solution).
- tyrique.Mitchell commented on March 20th 20 at 11:45

Find more questions by tags AJAXJavaScript