Hacker News new | ask | show | jobs
by justindocanto 5275 days ago
Forgive me if this is a stupid question, but what's with the sleep functions between other function calls?

EDIT: Should have clarified. I'm referring to the demo.

3 comments

I believe this is simply to test/show that it actually works.
That's just the demo, so you get some numbers in the output (since it doesn't do anything otherwise).
as the other two stated, the sleep calls just simulate actual code running, so the profiler produces some output other than 0ms for everything.