got a segfault when trying to print the total elapsed time. Hence reverted that change
Seems to be in working state. But there is a CPU spin at the end of the program and std deviation seems to be wrong