allow different duration for the function

take two different polling cycle for the two different tasks