+/*
+ * Hold all screens for minimum three seconds, hold all screens with new info
+ * for at minimum eight seconds. There's a slight hack here; a screen with new
+ * info _might_ already be outdated (for instance, if we do an update to a group
+ * with a mistake, then correct it quick afterwards). If it's already outdated,
+ * we ignore the "eight second" rule; the results will be somewhat ugly, though,
+ * but it's hard to do much better without too much special code.
+ */
+bool RotateScreen::can_update()
+{
+ struct timeval now;
+ gettimeofday(&now, NULL);
+
+ double since = double(now.tv_sec - last_update.tv_sec) +
+ double(now.tv_usec - last_update.tv_usec) * 1.0e-6;
+
+ if (since < 3.0)
+ return false;
+ if (fade_to_new_info && subscreens.size() > 0 && !subscreens[current_screen].screen->check_invalidated() && since < 8.0)
+ return false;
+ return true;
+}
+