From bfce5806c2c155307067492ef16a87dab391c550 Mon Sep 17 00:00:00 2001 From: song Date: Wed, 17 May 2017 10:38:00 +0800 Subject: [PATCH] Update Readme.md (#985) Change ```new Date``` to ```Date.now``` --- Readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 869c8b6..25621c1 100644 --- a/Readme.md +++ b/Readme.md @@ -56,9 +56,9 @@ Here is an example of logger middleware with each of the different functions: ```js app.use(async (ctx, next) => { - const start = new Date(); + const start = Date.now(); await next(); - const ms = new Date() - start; + const ms = Date.now() - start; console.log(`${ctx.method} ${ctx.url} - ${ms}ms`); }); ```