C# Класс LitDev.LDStopwatch

Показать файл Открыть проект

Открытые методы

Метод Описание
Add ( ) : Primitive

Create a new stopwatch.

DelayUpTo ( Primitive delay ) : void

Delay up to a maximum interval since the last time this is called. Useful in a game loop to maintain an even play speed.

ElapsedMilliseconds ( Primitive stopwatch ) : Primitive

Gets the total elapsed time measured in milliseconds.

ElapsedTicks ( Primitive stopwatch ) : Primitive

Gets the total elapsed time measured in timer ticks for very short intervals.

Reset ( Primitive stopwatch ) : void

Stops the current stopwatch and resets the elapsed time to 0.

Restart ( Primitive stopwatch ) : void

Stops the current stopwatch, resets the elapsed time to 0 and restarts the stopwatch.

Start ( Primitive stopwatch ) : void

Starts or resumes the current stopwatch.

Stop ( Primitive stopwatch ) : void

Stops the current stopwatch.

Приватные методы

Метод Описание
GetNewWatch ( ) : string

Описание методов

Add() публичный статический Метод

Create a new stopwatch.
public static Add ( ) : Primitive
Результат Primitive

DelayUpTo() публичный статический Метод

Delay up to a maximum interval since the last time this is called. Useful in a game loop to maintain an even play speed.
public static DelayUpTo ( Primitive delay ) : void
delay Primitive The maximum delay in ms.
Результат void

ElapsedMilliseconds() публичный статический Метод

Gets the total elapsed time measured in milliseconds.
public static ElapsedMilliseconds ( Primitive stopwatch ) : Primitive
stopwatch Primitive The stopwatch name.
Результат Primitive

ElapsedTicks() публичный статический Метод

Gets the total elapsed time measured in timer ticks for very short intervals.
public static ElapsedTicks ( Primitive stopwatch ) : Primitive
stopwatch Primitive The stopwatch name.
Результат Primitive

Reset() публичный статический Метод

Stops the current stopwatch and resets the elapsed time to 0.
public static Reset ( Primitive stopwatch ) : void
stopwatch Primitive The stopwatch name.
Результат void

Restart() публичный статический Метод

Stops the current stopwatch, resets the elapsed time to 0 and restarts the stopwatch.
public static Restart ( Primitive stopwatch ) : void
stopwatch Primitive The stopwatch name.
Результат void

Start() публичный статический Метод

Starts or resumes the current stopwatch.
public static Start ( Primitive stopwatch ) : void
stopwatch Primitive The stopwatch name.
Результат void

Stop() публичный статический Метод

Stops the current stopwatch.
public static Stop ( Primitive stopwatch ) : void
stopwatch Primitive The stopwatch name.
Результат void