rounding function

Rounding down or up a nanotime type