use the internal timing function of angular