Your code needs to take 'exactly' one second or 'exactly' two seconds to run (depending on the input) — accurate to ±0.5 milliseconds.
The input will be the number of milliseconds to wait (i.e. 1000 or 2000). No output is required.
But the catch is that while waiting you have to 'take it easy'. In other words, you're not supposed to be working, so the CPU time should account for less than 5% of the time you've waited.
-----
Previous: Wait a second!
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers9
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15780 Solvers
-
Create a function handle that reverses the input arguments of another function handle
157 Solvers
-
Getting the indices from a vector
11783 Solvers
-
658 Solvers
-
Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
955 Solvers
More from this Author32
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!