diff options
author | Max Kellermann <max@duempel.org> | 2010-11-05 08:02:38 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-11-05 09:47:43 +0100 |
commit | 2dc6ed7b3a2faf27d33fa8bbcf924031fde0e21a (patch) | |
tree | b5ac194133bac616b12a97a875ca87fe24323a6b /src/timer.c | |
parent | ad430c661780ed196d772564f9a49d5dacb5df0f (diff) | |
download | mpd-2dc6ed7b3a2faf27d33fa8bbcf924031fde0e21a.tar.gz mpd-2dc6ed7b3a2faf27d33fa8bbcf924031fde0e21a.tar.xz mpd-2dc6ed7b3a2faf27d33fa8bbcf924031fde0e21a.zip |
output_plugin: add method delay()
This method is used to reduce the delay of commands issued to the
shout plugin.
Diffstat (limited to '')
-rw-r--r-- | src/timer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/timer.c b/src/timer.c index 49c2ee3ac..e125b1009 100644 --- a/src/timer.c +++ b/src/timer.c @@ -74,12 +74,12 @@ void timer_add(Timer *timer, int size) unsigned timer_delay(const Timer *timer) { - int64_t delay = timer->time - now(); + int64_t delay = (timer->time - now()) / 1000; if (delay < 0) return 0; - if (delay > 1000 * 1000 * 1000) - return 1000 * 1000; + if (delay > G_MAXINT) + delay = G_MAXINT; return delay / 1000; } |