In that case, it would mean that the number of cycles would vary during a second. Some hardware have varying frequencies (for example idle mode, and turbo modes). If that is the case, because the way a computer count cycles will never be as precise as an atomic clock, it means that a "second" ( period = std::ratio) for a computer can be actually shorter or bigger than an actual second, causing differences in the long run for time measurements between the computer clock and let's say GPS. Question 1: Does a cpu or a gpu has any other way to evaluate time than by counting cycles? At the same time, I guess the only way a cpu can evaluate time, is by counting cycles. Std::chrono offer several clocks to measure times.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |