in the example, they put 1002, but my solution was 1001, and and pass the exercise. What is the cause of this?
why 1001 and no 1002?
You must be signed in to leave a comment
9 June 2020, 03:55
LucGar, the 1002ms is just the time it took to execute the segment below: startPlaying() = 1 ms sleepNSeconds(1); = 1000 ms stopPlaying() = 1 ms Total = 1002 ms But this can vary depending on the computer and what may be running on the computer. In your case it may look like: startPlaying() = .5 ms sleepNSeconds(1); = 1000 ms stopPlaying() = .5 ms Total = 1001 ms