Update Readme.md (#985)

Change ```new Date``` to ```Date.now```
This commit is contained in:
song 2017-05-17 10:38:00 +08:00 committed by Yiyu He
parent d394724200
commit bfce5806c2

View file

@ -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`);
});
```