Set time(r )function help MX question

does anyone know how to set a time. I.E I have a sound and I want to set a time for this sound to make it play for a certain time and after it plays it should go to a certain frame, any help or tutorial will be helpful an dgreatfully appreciated