curiosity-ai / h5

🚀 The next generation C# to JavaScript compiler

Home Page:https://h5.rocks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add console timing functions for benchmarking.

IceReaper opened this issue · comments

https://developer.mozilla.org/en-US/docs/Web/API/Console/time
Would be nice to have the three time related functions available :)

Hi @IceReaper - you can already access them in the dom console (which is not the same as the System.Console class)

using static H5.Core.dom;

// ....

console.time("Time this");

for (var i = 0; i < 10000; i++) {
  // Your stuff here
}

console.timeEnd("Time this");