Continuous-time random-walk simulation of H~2 formation on interstellar grains