Limit lossless refresh update to safe size
We don't want to waste bandwidth on the lossless refresh if we might
need that bandwidth for a normal update. Try to estimate how much
data we can safely send without interfering.
diff --git a/common/rfb/Timer.h b/common/rfb/Timer.h
index 78687d1..15b5d03 100644
--- a/common/rfb/Timer.h
+++ b/common/rfb/Timer.h
@@ -1,4 +1,5 @@
/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
+ * Copyright 2018 Pierre Ossman for Cendio AB
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -85,6 +86,11 @@
// Usually used with isStarted() to get the _current_ timeout.
int getTimeoutMs();
+ // getRemainingMs
+ // Determines how many milliseconds are left before the Timer
+ // will timeout. Only valid for an active timer.
+ int getRemainingMs();
+
// isBefore
// Determine whether the Timer will timeout before the specified time.
bool isBefore(timeval other);