UNPKG

spur-common

Version:

A Node.JS library of common modules used as a base to most Node.JS applications.

16 lines (11 loc) 247 B
module.exports = function (Timer, HTTPPlugin) { class HTTPTiming extends HTTPPlugin { start() { this.timer = new Timer().start(); } end() { this.request.duration = this.timer.stop(); } } return HTTPTiming; };