Delay for c++

Does anyone know a compatible delay function for c++? I would like to use it to make the computer slow down, and make it easier for calculations. Thanks!

You are viewing a single comment. View All

@mwilki7 because of habits. If you develop a habit of only using a method that works on only a few OSs when there is a way that is entirely portable, you’re going to mess up one day. Also If you don’t even know it’s not portable, you could end up having there be an error and not knowing why on a different system. It’s different if it’s not something you can do with the standard library, though that I’d consider a skill. But otherwise it will just be a hindrance. Also if you use tons of different methods that aren’t standard, it will reduce code readability. For example, in using a function named 'sleep' I have no idea how long it will sleep for in terms of units. But on the other hand, if you use sleep_for() I can look that up on a cpp reference for the standard lib and immediately get my answer, or I could already know the answer.

It’s more than just portability, it’s about good and bad practices. I’m not saying what ya’ll are doing is evil or anything, but it is a little bit better this way.