Replace whenToDisplay with main function getUpdateFrequency().