Benchmark

Summary

The System.Benchmark class is a utility class for measuring the duration (in milliseconds) between a start and stop time.

Description

The System.Benchmark class is a utility class for measuring the duration (in milliseconds) between a start and stop time.

Examples

Basic Usage
1
2
3
4
5
6
7
8
import System;
 
Benchmark bench = new Benchmark();
bench.start();
// ... do stuff
bench.stop();
  
Console.log(bench.duration);

Methods

  • duration

    Calculates the duration (in milliseconds) between the time when the benchmark timer was started and the time the benchmark timer was stopped.

  • start

    Starts the benchmark timer.

  • stop

    Stops the the benchmark timer.

Share

HTML | BBCode | Direct Link