• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List
  • File Members

ManualClock.h

Go to the documentation of this file.
00001 /* 
00002  *   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
00003  * 
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 3 of the License, or
00007  * (at your option) any later version.
00008  * 
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  * 
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00017  *
00018  *
00019  */ 
00020 
00021 #ifndef _GNASH_MANUAL_CLOCK_HH
00022 #define _GNASH_MANUAL_CLOCK_HH
00023 
00024 #include "VirtualClock.h" // for inheritance
00025 
00026 namespace gnash {
00027 
00029 class ManualClock : public VirtualClock
00030 {
00031 public:
00032 
00034         ManualClock()
00035                 :
00036                 _elapsed(0)
00037         {}
00038 
00039         // see dox in VirtualClock.h
00040         unsigned long elapsed() const
00041         {
00042                 return _elapsed;
00043         }
00044 
00045         // see dox in VirtualClock.h
00046         void restart()
00047         {
00048                 _elapsed=0;
00049         }
00050 
00052         void advance(unsigned long amount)
00053         {
00054                 _elapsed += amount;
00055         }
00056 
00057 private:
00058 
00059         unsigned long _elapsed;
00060 };
00061 
00062 
00063 } // namespace gnash
00064 
00065 #endif // _GNASH_MANUAL_CLOCK_HH

Generated on Fri Mar 16 2012 15:46:11 for Gnash by  doxygen 1.7.1