writes timings in ns and ms