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 comments
Loading...
Problem Recent Solvers11
Suggested Problems
-
Return the 3n+1 sequence for n
8541 Solvers
-
2550 Solvers
-
Create logical matrix with a specific row and column sums
354 Solvers
-
540 Solvers
-
Is this is a Tic Tac Toe X Win?
538 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!