c# - System.Threading.Timer ... Time of next fire? -


i have question timer. interval time count time of callback executions? mean example - have timer set fire every 15 seconds , executes callback function lasts approximately 3 seconds in time. when next time timer fire? in 18 seconds (after callback completes) or after 15 seconds (without waiting callback)??? in advance

it fire every 15 seconds regardless of callback execution time. if want include callback execution time, can suspend , restart timer in callback follows;

at start:

sometimer.change(timeout.infinite, timeout.infinite)

.. , @ end, change same method:

sometimer.change(timespan.fromseconds(15), timespan.fromseconds(15))


Comments

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -