function for set a time!