- Main Page
- Classes
- Files

- File List
- File Members

# E:/uas2/Server/Timer.h

    00001 // Timer.h: interface for the Timer class.
    00002 //
    00004
    00005 #if !defined(AFX_TIMELIMIT_H__D2107E6A_33E5_11D3_8D14_00E0980636C2__INCLUDED_)
    00006 #define AFX_TIMELIMIT_H__D2107E6A_33E5_11D3_8D14_00E0980636C2__INCLUDED_
    00007
    00008 #if _MSC_VER > 1000
    00009 #pragma once
    00010 #endif // _MSC_VER > 1000
    00011
    00012 class Timer
    00013 {
    00014 public:
    00015         void                    StopTicking();
    00016         void                    StartTicking();
    00017         Timer();
    00018         virtual ~Timer();
    00019         int                             GetTimeout(){return m_msTimeout;}
    00020         void                    SetTimeout(int t){m_msTimeout=t;}
    00021 protected:
    00022         int                             m_msTimeout;
    00023         virtual void    Tick();
    00024 private:
    00025         HANDLE                  m_hThreadDone;
    00026         bool                    m_bStop;
    00027         static UINT             TickerThread(LPVOID pParam);
    00028         HANDLE                  m_hEndThread;
    00029 };
    00030
    00031 #endif // !defined(AFX_TIMELIMIT_H__D2107E6A_33E5_11D3_8D14_00E0980636C2__INCLUDED_)