dustydeltatimer.h

Go to the documentation of this file.
00001 /*
00002 Dusty Engine Library
00003 by Dave Andrews
00004 
00005 Dusty Engine is a task engine using the Irrlicht (irrlicht.sourceforge.net)
00006 3d Engine, by Nikolaus Gebhardt.
00007 
00008 This software is released on the zlib license.  Contents of that license follow.
00009 
00010   Copyright (C) 2005 Dave Andrews
00011 
00012   This software is provided 'as-is', without any express or implied
00013   warranty.  In no event will the authors be held liable for any damages
00014   arising from the use of this software.
00015 
00016   Permission is granted to anyone to use this software for any purpose,
00017   including commercial applications, and to alter it and redistribute it
00018   freely, subject to the following restrictions:
00019 
00020   1. The origin of this software must not be misrepresented; you must not
00021      claim that you wrote the original software. If you use this software
00022      in a product, an acknowledgment in the product documentation would be
00023      appreciated but is not required.
00024   2. Altered source versions must be plainly marked as such, and must not be
00025      misrepresented as being the original software.
00026   3. This notice may not be removed or altered from any source distribution.
00027 
00028   Dave Andrews (dave@daveandrews.org)
00029   
00030 */
00031 
00032 #ifndef __DUSTY_DELTA_TIMER_H__
00033 #define __DUSTY_DELTA_TIMER_H__
00034 
00035 #include "dustyengine.h"
00036 #include <irrlicht.h>
00037 
00038 namespace DustyEngine
00039 {
00040         class DustyDriver;
00041 
00043 
00047         class DUSTYENGINE_API DeltaTimer : public irr::IUnknown
00048         {
00049         public:
00052                 DeltaTimer(DustyDriver * dustyDriver = NULL);
00053 
00055                 virtual ~DeltaTimer();
00056 
00058                 void SetTimer(irr::ITimer * timer);
00059 
00061                 irr::u32 NumAccesses();
00062 
00064                 irr::u32 GetDelta();
00065 
00067                 void ResetDelta(irr::u32 newDelta = 0);
00068 
00069         private:
00070                 irr::u32 delta;
00071                 irr::u32 numAccesses;
00072                 irr::ITimer * irrTimer;
00073         };
00074 }
00075 
00076 #endif
00077 

Generated on Fri Jan 27 17:31:49 2006 for Dusty Engine by  doxygen 1.4.6-NO