Humble Framework for SkyOS


Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

HTimer Class Reference
[System]

#include <HTimer.h>

Inheritance diagram for HTimer:

HObjNoCopy HObj

Public Member Functions

 HTimer (int32 nTimeOut=0)
ErrCode Reached (void)
 Should be called when the timer is reached.
ErrCode Restart (void)
 Restarts the timer.
ErrCode Start (HANDLE hWnd=NULL, int32 nTimeOut=0)
 Starts (creates) the timer.
ErrCode Stop (void)
 Destroys the timer.
uint32 GetID (void) const
 Returns the timer ID.
HANDLE GetTarget (void) const
 Returns the target window handle.
int32 GetTimeOut (void) const
 Returns the current time out value.
ErrCode SetTarget (HANDLE hWnd)
 Sets the target window handle.
ErrCode SetTimeOut (int32 nTimeOut)
 Sets the current time out value.
bool IsActive (void) const
 Determines if the timer is active, i.e., ticking.

Protected Attributes

uint32 m_tid
 timer identififier
int32 m_nTimeOut
 timer duration (in seconds)
HANDLE m_hwndTarget
 target window

Member Function Documentation

ErrCode HTimer::Reached void   ) 
 

The caller should invoke this method in response to a MSG_TIMER_REACHED message so that the timer knows that it has expired. Calling this method for a timer that hasn't been started (or has already been stopped) has no effect.

Returns:
Always NO_ERROR

Definition at line 55 of file HTimer.h.

ErrCode HTimer::Restart void   ) 
 

This method restarts the timer with the current time out value and target. If the timer is already active, it will be stopped and started; it the target has not been started (or has already been reached) then this is the same as starting it.

Returns:
NO_ERROR on success, error code otherwise

Definition at line 78 of file HTimer.h.

ErrCode HTimer::Start HANDLE  hWnd = NULL,
int32  nTimeOut = 0
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
hWnd [optional] Target window for MSG_TIMER_REACHED message
nTimeOut [optional] Desired timeout in seconds (must be > 0)

Definition at line 100 of file HTimer.h.

ErrCode HTimer::Stop void   ) 
 

Returns:
NO_ERROR on success, error code otherwise

Definition at line 138 of file HTimer.h.

uint32 HTimer::GetID void   )  const
 

Returns:
Timer ID if active, or zero if inactive

Definition at line 163 of file HTimer.h.

HANDLE HTimer::GetTarget void   )  const
 

Returns:
Target window handle

Definition at line 167 of file HTimer.h.

int32 HTimer::GetTimeOut void   )  const
 

Returns:
Time out value (in seconds)

Definition at line 171 of file HTimer.h.

ErrCode HTimer::SetTarget HANDLE  hWnd  ) 
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
hWnd Target window handle

Definition at line 176 of file HTimer.h.

ErrCode HTimer::SetTimeOut int32  nTimeOut  ) 
 

Returns:
NO_ERROR on success, error code otherwise
Parameters:
nTimeOut Value of timeout in seconds (must be positive)

Definition at line 190 of file HTimer.h.

bool HTimer::IsActive void   )  const
 

Returns:
True if value, false otherwise

Definition at line 211 of file HTimer.h.


The documentation for this class was generated from the following file:
 

2006.01.09-16:37