added elapsed time measurement (in nanoseconds)