Skip to content

Commit

Permalink
Update Readme.md (#985)
Browse files Browse the repository at this point in the history
Change ```new Date``` to ```Date.now```
  • Loading branch information
xiongsongsong authored and dead-horse committed May 17, 2017
1 parent d394724 commit bfce580
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
});
```
Expand Down

0 comments on commit bfce580

Please sign in to comment.