Smallest unit of time possible

3

What would be the smallest unit of time that currently can be measured using ordinary computers?

As far as I know, based on the computer clock they are milliseconds.

    
asked by anonymous 22.07.2014 / 00:56

1 answer

3

As fast as you can, nanoseconds and Maximum resolution depends on processor :

#include <sys/time.h>

int main()
{
   timespec ts;
   // clock_gettime(CLOCK_MONOTONIC, &ts); // Para FreeBSD
   clock_gettime(CLOCK_REALTIME, &ts); // Para Linux
}
    
22.07.2014 / 01:04