diff --git a/aio/content/guide/http.md b/aio/content/guide/http.md index 69278330e1..9011cc2161 100644 --- a/aio/content/guide/http.md +++ b/aio/content/guide/http.md @@ -389,12 +389,12 @@ export class TimingInterceptor implements HttpInterceptor { constructor(private auth: AuthService) {} intercept(req: HttpRequest, next: HttpHandler): Observable> { - const elapsed = Date.now(); + const started = Date.now(); return next .handle(req) .do(event => { if (event instanceof HttpResponse) { - const time = Date.now() - started; + const elapsed = Date.now() - started; console.log(`Request for ${req.urlWithParams} took ${elapsed} ms.`); } });