adds time measurement for serial reference implementation