Fixups for calculating nanoseconds.