add time set function