If your CPU runs at 240MHZ one CPU cycle is about 4.167ns so every system call etc is talking this time. Since you call
every call is taking at least 4.167 times the time you requested.
Try calling nanosleep with higher values!
if you look in the manpage from nanosleep (
man 2 nanosleep
). You would have read the following notes:
man 2 nanosleepIf the interval specified in req is not an exact multiple of the granuâlarity underlying clock (see time(7)), then the interval will be rounded up to the next multiple.