# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1654982131 -3600
# Node ID e79c64b2dfed1d5a73cf81a30a64a742f2ffe318
# Parent  e78b35574aaebfc08063d40c784b1306cefb6bb1
util.watchdog: Allow passing a new timeout to :reset()

diff -r e78b35574aae -r e79c64b2dfed util/watchdog.lua
--- a/util/watchdog.lua	Sat Jun 11 22:15:14 2022 +0100
+++ b/util/watchdog.lua	Sat Jun 11 22:15:31 2022 +0100
@@ -19,7 +19,10 @@
 	return watchdog;
 end
 
-function watchdog_methods:reset()
+function watchdog_methods:reset(new_timeout)
+	if new_timeout then
+		self.timeout = new_timeout;
+	end
 	if self.timer_id then
 		timer.reschedule(self.timer_id, self.timeout+1);
 	else