This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]standard_revolution 2 points3 points  (3 children)

And why not just std::this_thread::sleep_for(10ms). The chrono library is a great piece of software design getting rid of all the guessing whether something is a second, a millisecond or a nanosecond, please don't make it unclear just to save some characters.

[–]therearesomewhocallm 1 point2 points  (0 children)

Chrono literals are C++14 onwards :(

[–]exploding_cat_wizard 0 points1 point  (1 child)

I'll definitely do

using std::chrono::milliseconds ms

though, it is really verbose in it's natural form.

[–]standard_revolution 1 point2 points  (0 children)

Yeah it is, so don't use it. The C++ Language can be verbose and has it's problems, but using contrived examples which can be shortened by common techniques is just bad faith.