Control frames-per-second (fps) of a C/C++ thread in single line of code