Welcome to CWaitableTimer, a C++
class to support access to the Window APIs dealing with waitable timers.
- Simple and clean C++
- The code is Unicode enabled
and build configurations are provided.
The enclosed zip file contains the CWaitableTimer source code and a simple test program which exercises
all of the class methods.
- You are allowed to include the source code in
any product (commercial, shareware, freeware or otherwise) when your product
is released in binary form.
- You are allowed to modify the source code in
any way you want except you cannot modify the copyright details at the top
of each module.
- If you want to distribute source code with
your application, then you are only allowed to distribute versions released
by the author. This is to maintain a single distribution point for the
8 November 2002
- Removed some unnecessary comments in the module
- Updated copyright details in the module
V1.01 (18 February 2004)
- Completion routine can now be passed an LPVOID
parameter just like the SDK equivalent. Thanks to Erenst F. Wepener for
suggesting this addition.
- Minor updates to the code to allow the code to compile
on VC 5 without the requirement for the Platform SDK to be installed.
v1.02 (26 June 2006)
- Updated the documentation to use the same style as the web site.
- Updated copyright details.
- Removed various defines in code which were taken from the Platform SDK. This
does mean that the code now requires the Platform SDK if compiled using VC
- Optimized CWaitableTimer constructor code.
- Combined the functionality of the _WAITABLE_TIMER_DATA class into the
main CWaitableTimer class.
- Code now uses new C++ style casts rather than old style C casts where
- Reviewed all TRACE statements for correctness
v1.03 (1 June 2008)
- Code now compiles cleanly using Code Analysis (/analyze)
- The code has now been updated to support VC 2005 or later only.
- Updated the sample app to clean compile on VC 2008
v1.04 (16 February 2014)
- Updated copyright details
- Made the class into a Header only implementation. The WTimer.cpp module
is now defunct.
- Code now no longer uses GetProcAddress to obtain the waitable timer functions
since waitable timers have been available since Windows 2000.
- Made the code independent of MFC.
- Updated the code to clean compile using /analyze
- Updated the code to clean compile on VC 2010, 2012 & 2013
v1.05 (4 December 2015)
- Updated copyright details.
- Updated the code to clean compile on VC 2015.
- All the class methods have had SAL annotations added
- The SetOnceOffAbsolute, SetOnceOffRelative, SetPeriodicAbsolute &
SetPeriodicRelative methods has been reworked to expose all the parameters
of the underlying SetWaitableTimer API.
- Removed unnecessary ATLTRACE calls from various methods
- Added support for CreateWaitableTimerEx and SetWaitableTimerEx
APIs to class