Sul mio sistema, man 2 clock_nanosleep
spiega le differenze tra le due funzioni così:
Like nanosleep(2), clock_nanosleep() allows the caller to sleep for an
interval specified with nanosecond precision. It differs in allowing
the caller to select the clock against which the sleep interval is to
be measured, and in allowing the sleep interval to be specified as
either an absolute or a relative value.
The clock_id argument [...] can have one of the following values:
CLOCK_REALTIME A settable system-wide real-time clock.
CLOCK_MONOTONIC A non-settable, monotonically increasing clock that
measures time since some unspecified point in the past
that does not change after system startup.
CLOCK_PROCESS_CPUTIME_ID
A settable per-process clock that measures CPU time
consumed by all threads in the process.
Definire "buono". Portatile, efficiente, noto, facilmente comprensibile, preciso, cosa cosa cosa? – unwind
Hai letto le pagine man? http://linux.die.net/man/3/clock_nanosleep –
@SanJacinto nessuno legge le pagine man. È come se ti chiedessi "Hai letto i termini di servizio di Facebook" o un meccanico che ti chiedeva "Hai letto anche il manuale utente" quando non riesci a capire perché i tuoi raggi alti non funzioneranno = P – puk