Made timer somewhat more accurate