mrDarker
2025-07-16 1dbe46cd9d0f181d08d5a69f72d8548628a13b9d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// StopWatch.h: interface for the CStopWatch class.
//
//////////////////////////////////////////////////////////////////////
 
#if !defined(AFX_STOPWATCH_H__C2068F0F_528F_43C3_9A72_ECA8A4DCAFA2__INCLUDED_)
#define AFX_STOPWATCH_H__C2068F0F_528F_43C3_9A72_ECA8A4DCAFA2__INCLUDED_
 
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
 
#include <afxwin.h>
 
class CStopWatch  
{
public:
    CStopWatch();
    virtual ~CStopWatch();
 
public:
    void Start(void);
    void End(void);
    const float GetDurationSecond(void) const { return m_fTimeforDuration; }
    const float GetDurationMilliSecond(void) const { return m_fTimeforDuration*1000.f; }
 
public:
    LARGE_INTEGER GetStartInteger(void) const { return m_swStart; }
    LARGE_INTEGER GetEndInteger(void) const { return m_swEnd; }
    LARGE_INTEGER GetFrequency(void) const { return m_swFreq; }
 
protected:
    LARGE_INTEGER        m_swFreq, m_swStart, m_swEnd;
    float                m_fTimeforDuration;
};
 
#endif // !defined(AFX_STOPWATCH_H__C2068F0F_528F_43C3_9A72_ECA8A4DCAFA2__INCLUDED_)