Make automated FSCommand invocation tests show player-side output.
[gnash.git] / libcore / ManualClock.h
blobd0f12eb5ecd11204e5e3763e7addec1b7faedff3
1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
3 * Free Software Foundation, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
22 #ifndef _GNASH_MANUAL_CLOCK_HH
23 #define _GNASH_MANUAL_CLOCK_HH
25 #include "VirtualClock.h" // for inheritance
27 namespace gnash {
29 /// A manually advanced clock
30 class ManualClock : public VirtualClock
32 public:
34 /// Construct a manual clock
35 ManualClock()
37 _elapsed(0)
40 // see dox in VirtualClock.h
41 unsigned long elapsed() const
43 return _elapsed;
46 // see dox in VirtualClock.h
47 void restart()
49 _elapsed=0;
52 /// Advance the clock by the given amount of milliseconds
53 void advance(unsigned long amount)
55 _elapsed += amount;
58 private:
60 unsigned long _elapsed;
64 } // namespace gnash
66 #endif // _GNASH_MANUAL_CLOCK_HH