diff template/dw.c @ 2584:2acc7ba5dea0

Add HTIMER type and change dw_timer_() functions to use it. On existing platforms, HTIMER will be int for now allowing API backward compatibility. On new platforms, iOS and Android, these will be pointers to the timer objects. This allows simplifying the code paths on those platforms. May change it on other platforms such as Mac in a future major version.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 23 May 2021 21:39:25 +0000
parents 457c91634881
children 9be24001d288
line wrap: on
line diff
--- a/template/dw.c	Sun May 23 09:43:04 2021 +0000
+++ b/template/dw.c	Sun May 23 21:39:25 2021 +0000
@@ -3130,7 +3130,7 @@
  * Returns:
  *       Timer ID for use with dw_timer_disconnect(), 0 on error.
  */
-int API dw_timer_connect(int interval, void *sigfunc, void *data)
+HTIMER API dw_timer_connect(int interval, void *sigfunc, void *data)
 {
     return 0;
 }
@@ -3140,7 +3140,7 @@
  * Parameters:
  *       id: Timer ID returned by dw_timer_connect().
  */
-void API dw_timer_disconnect(int timerid)
+void API dw_timer_disconnect(HTIMER timerid)
 {
 }