return CPU time (milliseconds since start of the computer) as number
Follow example return the time in Milliseconds which take the loop with string operation
let start=Date.cpu() ; // Start
let text="";
for (L=1;L<1000;L++) text+=L;
alert("Loop time: "+(Date.cpu() - start)+"ms");