3
What would be the smallest unit of time that is currently possible to measure using ordinary computers?
As far as I can tell,.
3
What would be the smallest unit of time that is currently possible to measure using ordinary computers?
As far as I can tell,.
3
The fastest you can do is nanoseconds and the maximum resolution depends on the processor:
#include <sys/time.h>
int main()
{
timespec ts;
// clock_gettime(CLOCK_MONOTONIC, &ts); // Para FreeBSD
clock_gettime(CLOCK_REALTIME, &ts); // Para Linux
}
Browser other questions tagged benchmark
You are not signed in. Login or sign up in order to post.
The
CLOCK_MONOTONIC
is only for Freebsd or all BSD?– ptkato
Friend, if the processor resolution is too large, it is possible that there is a dessynchronization between the computers even if "one day" adjusted at the same time?
– Weslley C X Sardinha
@Patrick tested only on Freebsd, but a quick search indicated to me that it is also present on Netbsd and Openbsd but not on Mac OS X.
– Mansueli
@Weslleycxsardinha depends a lot on how to adjust these computers, but not because the resolution changes what the minimum. And in larger units (minutes/seconds) the sync will remain. Now if you want to sync in nanoseconds, in this case there will be no permanent sync.
– Mansueli
Such asynchrony can be predicted or is achieved through random effects?
– Weslley C X Sardinha
Read that article
– Mansueli