Diff

teal-src/module.d.tl @ 12502:5862ddf71e3c

teal/moduleapi: Describe timer wrapper Since it's used in mod_cron
author Kim Alvefur <zash@zash.se>
date Sun, 15 May 2022 15:27:35 +0200
parent 11941:cfd37453e6b6
child 12643:9fa749cbd376
line wrap: on
line diff
--- 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+"