teal/moduleapi: Describe timer wrapper
authorKim Alvefur <zash@zash.se>
Sun, 15 May 2022 15:27:35 +0200
changeset 12506 5862ddf71e3c
parent 12505 042de4f0076e
child 12507 ad49bb3a4780
teal/moduleapi: Describe timer wrapper Since it's used in mod_cron
teal-src/module.d.tl
--- a/teal-src/module.d.tl	Mon May 09 22:40:45 2022 +0200
+++ b/teal-src/module.d.tl	Sun May 15 15:27:35 2022 +0200
@@ -62,7 +62,12 @@
 	send_iq : function (moduleapi, st.stanza_t, util_session, number)
 	broadcast : function (moduleapi, { string }, st.stanza_t, function)
 	type timer_callback = function (number, ... : any) : number
-	add_timer : function (moduleapi, number, timer_callback, ... : any)
+	record timer_wrapper
+		stop : function (timer_wrapper)
+		disarm : function (timer_wrapper)
+		reschedule : function (timer_wrapper, number)
+	end
+	add_timer : function (moduleapi, number, timer_callback, ... : any) : timer_wrapper
 	get_directory : function (moduleapi) : string
 	enum file_mode
 		"r" "w" "a" "r+" "w+" "a+"