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

It is possible to alter the period of a repeating callback timer, after it has been created, by calling hqn_timer_reset (). This takes a handle of an existing timer and new first and repeat time values (still in milliseconds). For example, to reduce the keep alive time from the previous example:

                        unsigned int new_ping_delay = 30*1000;
                        hqn_timer_reset(keep_alive_timer, new_ping_delay, new_ping_delay);

As with hqn_create_timer (), the first-time value is a delay until the first call and the second value is the repeating time period, with the same zero value semantics. The new timer period takes effect after any currently running timer callback.

NOTE:  In version 20110324 of the timer API library the hqn_create_timer () function is not implemented and has no effect when called. Users of this version of the library who want to change the period of a timed callback should first delete the timer and then create a new one with the required timer period.