I\'ve seen a few solutions, including watch and simply running a looping (and sleeping) script in the background, but nothing has been ideal.
I have a script that ne
Use nanosleep(2). It uses structure timespec that is used to specify intervals of time with nanosecond precision.
timespec
struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* nanoseconds */ };