Skip to main content
Skip table of contents

(v13) Changing the timer period

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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.