algorithm 1.7 implemented, increase the time measure resolution to microsecond