Set frameInterval dynamically