00001 /******************************************************************************* 00002 This file is Part of the ZEngine Library for 2D game development. 00003 Copyright (C) 2002, 2003 James Turk 00004 00005 Licensed under a BSD-style license. 00006 00007 The maintainer of this library is James Turk (james@conceptofzero.net) 00008 and the home of this Library is http://www.zengine.sourceforge.net 00009 *******************************************************************************/ 00010 00024 #ifndef __ze_ztimer_h__ 00025 #define __ze_ztimer_h__ 00026 00027 #include "ZE_ZObject.h" 00028 00029 namespace ZE 00030 { 00031 00037 class ZTimer : public ZObject 00038 { 00039 protected: 00041 bool rPaused; 00043 bool rUseZEngine; 00045 Uint32 rPausedTime; 00047 Uint32 rLastPause; 00048 00055 Uint32 GetParentTime(); 00056 00057 public: 00058 00065 ZTimer(bool useZEngine=true); 00066 00072 void Reset(); 00073 00079 void Pause(); 00080 00086 void Unpause(); 00087 00094 Uint32 GetTime(); 00095 00102 bool IsPaused(); 00103 }; 00104 00105 } 00106 00107 #endif //__ze_ztimer_h__