Improve timing script