now with nanoseconds! Had to ditch c99 though