improve SHM time stamp rounding

Correct for rounding error in clock time stamp to improve the accuracy
with microsecond SHM.
generate refclock samples only if requested