Executes the given code block and returns a Duration of how long it took to execute in nanosecond precision.