+
+ append (entry->message ());
+ if (_log.size() > log_lines) {
+ emit (boost::bind (boost::ref (Removed), _log.front().length()));
+ _log.pop_front ();
+ }
+ _last_time = *local;
+
+ shared_ptr<const EncodedLogEntry> encoded = dynamic_pointer_cast<const EncodedLogEntry> (entry);
+ if (encoded) {
+ _history.push_back (encoded->seconds ());
+ if (_history.size() > 48) {
+ _history.pop_front ();
+ }
+ if (_history.size() > 2) {
+ boost::mutex::scoped_lock lm (_state_mutex);
+ _fps = _history.size() / (_history.back() - _history.front());
+ }
+ }
+ }
+
+ void append (string s)
+ {
+ _log.push_back (s);
+ emit (boost::bind (boost::ref (Appended), s));