How to console.log the current time of functions being called/executed (JavaScript)?

I’m building this webscraper app and I wanted to console the time my functions are being executed. Reason is I wanted to better control when each of my functions are going to be executed to avoid flooding the website with requests at the same time. These are async functions as I need certain lines to be executed before others. I was able to ‘organize’ them and choose which one is going to be executed first by using promises. Now I’d like to console.log the time each function is being executed so I can better setTimeout each of them.

A small sample of my code follows:


/* Scrape refrigeratedFoodSection */

function scrapeCheese() {

function scrapeCheeseBlock() {

function mediumCheeseSlices() {
  return new Promise(function (resolve, reject) {
    async function scrapeUrl(url) {
      const browser = await puppeteer.launch({ headless: "new" });

I’ve tried building a scraperTimer but it didn’t work. It brings back the same time for all functions even tough I have called the timer inside of each of my scraping functions:

const scrapeClock = new Date();
const hour = scrapeClock.getHours();
const min = scrapeClock.getMinutes();
const second = scrapeClock.getSeconds();
const scrapeTimer = hour+':'+min+":"+second

Screenshot of terminal

I’m new to this so I still not understanding if functions are all called at the same time but executed in different times (because of the promises), or if they are actually being executed at different times (which is what I was expecting by using promises) and the problem resides in my scrapTimer being faulty.