I am new to Angular 2. Is there any start timer and stop timer and reset in Angular 2.
For example I want to start a timer before sending a post request and stop the timer after getting response back from the server. Help is appreciated.
executeUserAddressFlow(request: any): any {
Start timer here ---->
return this.http.post(this.Url, req, { headers: sampleHeader })
.map(
res => res.json(),
stop somewhere here ----->
error => error
);
}
i just need to log response time frame.
Thanks