Suppose I want to play an audio file every three seconds (maybe some regular alarm) There are two ways to this On startup Play audio file Set timer for 3 seconds OnTimer Play audio file Set timer for 3 seconds OnStartup starttime = timeGetTime() Play audio file next audiotime = 3 Set timer for next audiotime. (timegertime()-starttime) Ontimer play audio file nextaudiotime + = 3 set timer for nextaudiotime-(timegettime()=starttime) Assume the time to service a timer expiration averages 3 milliseconds and the time to start up an audio file averages 20 milliseconds. After one hour, how many times will method A and expected to play the audio file After one day, how many times will method A and method B be expected to play the audio file? It common that a multimedia presentation will have a characteristic called latency. Latency is a processing delay exhibited by the media As an example, playing audio from a file may require a variable amount of time, depending on how busy the system is. how quickly the file can be accessed, and how much decompress an is required For this reason, most multimedia allow you to load the media, then play it. So, you can tell it to open an audio file in advance, then tell it to play the audio fie The time to start playing is generally why small is this case because the systems has been able to prepare for t suppose pay requires less than a millisecond, open can secure up to 1 second Monty the algorithm tom Method B above to play different audio file every three seconds and ensure the audio is played on time (with 5 milliseconds will be acceptable). Suppose I want to play an audio file every three seconds (maybe some regular alarm) There are two ways to this On startup Play audio file Set timer for 3 seconds OnTimer Play audio file Set timer for 3 seconds OnStartup starttime = timeGetTime() Play audio file next audiotime = 3 Set timer for next audiotime. (timegertime()-starttime) Ontimer play audio file nextaudiotime + = 3 set timer for nextaudiotime-(timegettime()=starttime) Assume the time to service a timer expiration averages 3 milliseconds and the time to start up an audio file averages 20 milliseconds. After one hour, how many times will method A and expected to play the audio file After one day, how many times will method A and method B be expected to play the audio file? It common that a multimedia presentation will have a characteristic called latency. Latency is a processing delay exhibited by the media As an example, playing audio from a file may require a variable amount of time, depending on how busy the system is. how quickly the file can be accessed, and how much decompress an is required For this reason, most multimedia allow you to load the media, then play it. So, you can tell it to open an audio file in advance, then tell it to play the audio fie The time to start playing is generally why small is this case because the systems has been able to prepare for t suppose pay requires less than a millisecond, open can secure up to 1 second Monty the algorithm tom Method B above to play different audio file every three seconds and ensure the audio is played on time (with 5 milliseconds will be acceptable)