Can this be created in javascript. A timer?

You would place the console.time command in a separate script right at the top of the page.

<script>
console.time("Page load");
console.timeEnd("Page load");
</script>

<script>
console.time("Page load");
console.timeEnd("Page load");
</script>

<a href="https://www.google.com/"></a>
<div id="report">Measuring...</div>

<script>

  function determineImageTiming(url) {
    var reportDiv = document.getElementById('report');
    if (window.performance.getEntriesByName) {
      var timer = window.performance.getEntriesByName(url);
      var imageLoadTime = timer[0]['responseEnd'].toFixed(0);      
      reportDiv.innerHTML = 'Image Loaded at: ' + imageLoadTime + 'ms';
    }
    else {
      reportDiv.innerHTML = "window.performance.getEntriesByName not available";
    }
  }

  window.onload = function() {
    determineImageTiming('https://www.google.com/'); 
  }

</script>

That is likely to measure 0 time.

Move the console.timeEnd part in to the load event, so that when the page has finished loading it will end the timer.

<script>
console.time("Page load");
</script>

<a href="https://www.google.com/"></a>
<div id="report">Measuring...</div>

<script>

  function determineImageTiming(url) {
    var reportDiv = document.getElementById('report');
    if (window.performance.getEntriesByName) {
      var timer = window.performance.getEntriesByName(url);
      var imageLoadTime = timer[0]['responseEnd'].toFixed(0);      
      reportDiv.innerHTML = 'Image Loaded at: ' + imageLoadTime + 'ms';
    }
    else {
      reportDiv.innerHTML = "window.performance.getEntriesByName not available";
    }
  }

  window.onload = function() {
    determineImageTiming('https://www.google.com/'); 
   console.timeEnd("Page load");
  }

</script>

That’s right. The console will now show the page load time.

now what?

Look at the console after the page has loaded. You will see the page load time shown there.

no I won’t cause nothing shows in there.

Let us figure out where the problem is then. A link to the code will be helpful for that.

The script wasn’t able to be executed because of an error somewhere else in your code.

The console says that the error occurs at the responseEnd part of the code.

Deleting all of that other scripting code, and it now works, showing a really small loading time. https://jsfiddle.net/xxys6aq3/1/

Can I show it in seconds, instead of milliseconds?

It only shows milliseconds because seconds are too long for computers.

How come this shows seconds?

Because that’s using a more complicated technique than console.time

What kind of technique is that using, and can I incorporate that technique?

They are using the built-in Date object to get the time, and yes, you can copy their technique.

What does built in date object mean?