Definition at line 5 of file DTimer.cs.
◆ Frame2()
| void BioImager.DTimer.Frame2 |
( |
| ) |
|
Definition at line 31 of file DTimer.cs.
32 {
33
34 long currentTime = _StopWatch.ElapsedTicks;
35
36
37 float timeDifference = currentTime - m_LastFrameTime;
38
39
40 FrameTime = timeDifference / m_ticksPerMs;
41 CumulativeFrameTime += FrameTime;
42
43
44 m_LastFrameTime = currentTime;
45 }
◆ Initialize()
| bool BioImager.DTimer.Initialize |
( |
| ) |
|
Definition at line 17 of file DTimer.cs.
18 {
19
20 if (!Stopwatch.IsHighResolution)
21 return false;
22 if (Stopwatch.Frequency == 0)
23 return false;
24
25
26 m_ticksPerMs = (float)(Stopwatch.Frequency / 1000.0f);
27
28 _StopWatch = Stopwatch.StartNew();
29 return true;
30 }
◆ CumulativeFrameTime
| float BioImager.DTimer.CumulativeFrameTime |
|
get |
◆ FrameTime
| float BioImager.DTimer.FrameTime |
|
get |
The documentation for this class was generated from the following file:
- F:/repos/BioImager/BioImager/Graphics/System/DTimer.cs