class · System.Diagnostics

Stopwatch

public class System.Diagnostics.Stopwatch : System.Any

Measures elapsed time, from the runtime's monotonic clock in nanoseconds.

Tipo
class
Espacio de nombres
System.Diagnostics
Ensamblado
System.Core
Acceso
public, final
Archivo fuente
Runtime.ant

Herencia

Clases base
Any Stopwatch

Propiedades

static property Frequency: i64
#

static read-only

Ticks of GetTimestamp and ElapsedTicks per second (they are nanoseconds).

static property IsHighResolution: bool
#

static read-only

property IsRunning: bool
#

read-only

property Elapsed: System.TimeSpan
#

read-only

property ElapsedMilliseconds: i64
#

read-only

property ElapsedTicks: i64
#

read-only

Métodos

static method GetTimestamp() -> i64
#

static

The clock now, in ticks of Frequency.

static method GetElapsedTime(start: i64) -> System.TimeSpan
#

static

The time from a timestamp to now, and between two.

static method GetElapsedTime(start: i64, end: i64) -> System.TimeSpan
#

static

static method StartNew() -> System.Diagnostics.Stopwatch
#

static

method Start() -> void
#
method Stop() -> void
#
method Reset() -> void
#
method Restart() -> void
#

Miembros privados e internos (5)

field started: i64
#

private

field elapsed: i64
#

private

field running: bool
#

private

static method Now() -> i64
#

private static

method Nanoseconds() -> i64
#

private

Nanoseconds so far.

Miembros heredados (5)

Código fuente

Stopwatch en Larva HIR, descompilado a partir de su Larva HIR.

System.Diagnostics.Stopwatch.hir
// Measures elapsed time, from the runtime's monotonic clock in nanoseconds.
public class System.Diagnostics.Stopwatch : System.Any
{
    field started: i64
    field elapsed: i64
    field running: bool
    static method Now() -> i64
    // Nanoseconds so far.
    method Nanoseconds() -> i64
    // The clock now, in ticks of Frequency.
    static method GetTimestamp() -> i64
    // The time from a timestamp to now, and between two.
    static method GetElapsedTime(start: i64) -> System.TimeSpan
    static method GetElapsedTime(start: i64, end: i64) -> System.TimeSpan
    static method StartNew() -> System.Diagnostics.Stopwatch
    method Start() -> void
    method Stop() -> void
    method Reset() -> void
    method Restart() -> void
    // Ticks of GetTimestamp and ElapsedTicks per second (they are nanoseconds).
    static property Frequency: i64
    static property IsHighResolution: bool
    property IsRunning: bool
    property Elapsed: System.TimeSpan
    property ElapsedMilliseconds: i64
    property ElapsedTicks: i64
}
Esc