0

Is it possible to log calling performance.now() in Javascript in console? I could not get result in console and I think performance.now() is not an event that can be observable in console as an event.

My code:

function myFunction() { Hi(); } function Hi() { performance.now(); } 
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • Where's your code? – GetSet Jan 22 '20 at 15:20
  • function myFunction() { Hi(); } function Hi() { performance.now(); } –  Jan 22 '20 at 15:23
  • Are you using `console.log()`? – GetSet Jan 22 '20 at 15:25
  • at first I used monitorEvents() and then the code in the first answer in the link: https://stackoverflow.com/questions/5033836/adding-console-log-to-every-function-automatically –  Jan 22 '20 at 15:31
  • Doesn't that complicate your actual question? – GetSet Jan 22 '20 at 15:33
  • If I want to say simple, the number of calling of performance.now() in a web page is important for my purpose, so I want to log them and by a variable count them. My question is that if I can monitor this event or not –  Jan 22 '20 at 15:36
  • You mean that I type console.log(performance.now()) in the console? –  Jan 22 '20 at 15:41

0 Answers0