stop watch to measure algorithm times