diff options
author | Rüdiger Timm <rt@openoffice.org> | 2006-02-09 13:48:22 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2006-02-09 13:48:22 +0000 |
commit | 0b5a59c1354bd22651a486af232cf2276fb2da9a (patch) | |
tree | 417d5977e7e0f8cc576d7b237e5579ad6bdd18ee /slideshow | |
parent | 06ea7382003de6f542b52ae8411ca9acb3e79d49 (diff) |
INTEGRATION: CWS thbpp2 (1.8.28); FILE MERGED
2006/01/27 13:56:31 thb 1.8.28.1: #i61190# Activities might add events - thus, can only reliably retrieve next timeout after processing activities queue.
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/source/engine/eventqueue.cxx | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx index 82204fb5d905..9ba102df4344 100644 --- a/slideshow/source/engine/eventqueue.cxx +++ b/slideshow/source/engine/eventqueue.cxx @@ -4,9 +4,9 @@ * * $RCSfile: eventqueue.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: rt $ $Date: 2005-09-07 20:25:42 $ + * last change: $Author: rt $ $Date: 2006-02-09 14:48:22 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -115,7 +115,7 @@ namespace presentation return true; } - double EventQueue::process() + void EventQueue::process() { VERBOSE_TRACE( "EventQueue: heartbeat" ); @@ -191,18 +191,21 @@ namespace presentation #endif } } - - // return time for next entry (if any) - return maEvents.empty() ? - ::std::numeric_limits<double>::max() : - maEvents.top().nTime; } - bool EventQueue::isEmpty() + bool EventQueue::isEmpty() const { return maEvents.empty(); } + double EventQueue::nextTimeout() const + { + // return time for next entry (if any) + return isEmpty() ? + ::std::numeric_limits<double>::max() : + maEvents.top().nTime - mpTimer->getElapsedTime(); + } + void EventQueue::clear() { // TODO(P1): Maybe a plain vector and vector.swap will |