Best way to sleep to conserve power

I'm thinking of a program where it would be constantly running, but only need to update itself or some file only once every hour or so.

Anyone have any suggestions on what is the most power-conservative way to do this?

Sleep is of course the way to do this, unless I'm mistaken, but:

Do any of you have experience in knowing if the C++11 way to sleep* is more efficient than platform-specific ways to sleep [Windows Sleep(), Linux sleep()/nanosleep()]? Or is the different so little that I shouldn't be worried? (I don't really have a way to measure this.)

*sleep_for(std::chrono::milliseconds(x));
Last edited on
Topic archived. No new replies allowed.