Created Date: 16 Mar, 2022 14:17
Last Modifed Date: 16 Mar, 2022 14:17

This page applies to Harlequin v13.1r0 and later; and to Harlequin MultiRIP but not Harlequin Core

When a timed callback is no longer needed, or the application is closing down, a timed callback can be cancelled by calling hqn_timer_destroy () using the timer's handle as returned from hqn_create_timer (). The following example shows how to remove the timer set up in the previous example code:

                      void remove_keep_alive_ping(void)

The call to hqn_destroy_timer () allows any currently running timer callback to run to completion. This allows any resources allocated for the timer callback to be released without synchronization concerns with the callback which may have been running when the timer is removed.

NOTE:  hqn_destroy_timer () should not be called from the callback function.