Hi @lucamar, yes I saw this formula and then posted the question, because it is not clear for me appears to be seconds.
Of course:
time.tv_sec is seconds, which multiplied by 1000 give milliseconds;
time.tv.usec are microseconds which divided by 1000 give, again, milliseconds.
The links posted by Thaddy are (somewhat) useful to know why a
time struct has to be used: for the system call that implements the timer. But Thaddy, note:
Resolution is either seconds or nanoseconds.
That is correct when you (have to) use the struct
timespec, but the structure used here is
timeval, which has only seconds and microseconds.
HTH!