Logo
Public Member Functions | Properties | List of all members
Yukar.Engine.StopWatch Class Reference

Stopwatch More...

Public Member Functions

 StopWatch ()
 Constructor (activate and generate) More...
 
 StopWatch (bool enable)
 constructor More...
 
void Start ()
 Start measurement More...
 
long Stop ()
 end the measurement More...
 
double Reset ()
 Stop measurement and initialize the elapsed time More...
 
double ReStart ()
 Stop measurement, initialize the elapsed time, and then start measurement again. More...
 
double Tick2Second (double tick)
 convert ticks to seconds More...
 
double Tick2MilliSecond (double tick)
 Convert ticks to milliseconds More...
 
double Tick2NanoSecond (double tick)
 Convert ticks to nanoseconds More...
 

Properties

bool Enable [get, set]
 enable use More...
 
long Frequency [get]
 number of ticks per second More...
 
double ElapsedSecond [get]
 Elapsed time (seconds) More...
 
long ElapsedMilliSecond [get]
 Elapsed time (ms) More...
 
double ElapsedNanoSecond [get]
 Elapsed time (nanoseconds) More...
 
long ElapsedTick [get]
 Elapsed time (minimum unit of resolution) More...
 

Detailed Description

Stopwatch

Constructor & Destructor Documentation

◆ StopWatch() [1/2]

Yukar.Engine.StopWatch.StopWatch ( )

Constructor (activate and generate)

◆ StopWatch() [2/2]

Yukar.Engine.StopWatch.StopWatch ( bool  enable)

constructor

Parameters
enableto enable

Member Function Documentation

◆ Reset()

double Yukar.Engine.StopWatch.Reset ( )

Stop measurement and initialize the elapsed time

Returns
Elapsed time before initialization (ticks)

◆ ReStart()

double Yukar.Engine.StopWatch.ReStart ( )

Stop measurement, initialize the elapsed time, and then start measurement again.

Returns
Elapsed time before initialization (ticks)

◆ Start()

void Yukar.Engine.StopWatch.Start ( )

Start measurement

◆ Stop()

long Yukar.Engine.StopWatch.Stop ( )

end the measurement

Returns
Elapsed time (ticks)

◆ Tick2MilliSecond()

double Yukar.Engine.StopWatch.Tick2MilliSecond ( double  tick)

Convert ticks to milliseconds

Parameters
ticktick
Returns
millisecond

◆ Tick2NanoSecond()

double Yukar.Engine.StopWatch.Tick2NanoSecond ( double  tick)

Convert ticks to nanoseconds

Parameters
ticktick
Returns
nanosecond

◆ Tick2Second()

double Yukar.Engine.StopWatch.Tick2Second ( double  tick)

convert ticks to seconds

Parameters
ticktick
Returns
seconds

Property Documentation

◆ ElapsedMilliSecond

long Yukar.Engine.StopWatch.ElapsedMilliSecond
get

Elapsed time (ms)

◆ ElapsedNanoSecond

double Yukar.Engine.StopWatch.ElapsedNanoSecond
get

Elapsed time (nanoseconds)

◆ ElapsedSecond

double Yukar.Engine.StopWatch.ElapsedSecond
get

Elapsed time (seconds)

◆ ElapsedTick

long Yukar.Engine.StopWatch.ElapsedTick
get

Elapsed time (minimum unit of resolution)

◆ Enable

bool Yukar.Engine.StopWatch.Enable
getset

enable use

◆ Frequency

long Yukar.Engine.StopWatch.Frequency
get

number of ticks per second