Improve timing function of image-zoom