/* automatically generated by JSCoverage - do not edit */
if (typeof _$jscoverage === 'undefined') _$jscoverage = {};
if (! _$jscoverage['middleware/responseTime.js']) {
  _$jscoverage['middleware/responseTime.js'] = [];
  _$jscoverage['middleware/responseTime.js'][18] = 0;
  _$jscoverage['middleware/responseTime.js'][19] = 0;
  _$jscoverage['middleware/responseTime.js'][20] = 0;
  _$jscoverage['middleware/responseTime.js'][22] = 0;
  _$jscoverage['middleware/responseTime.js'][23] = 0;
  _$jscoverage['middleware/responseTime.js'][25] = 0;
  _$jscoverage['middleware/responseTime.js'][26] = 0;
  _$jscoverage['middleware/responseTime.js'][27] = 0;
  _$jscoverage['middleware/responseTime.js'][30] = 0;
}
_$jscoverage['middleware/responseTime.js'][18]++;
module.exports = (function responseTime() {
  _$jscoverage['middleware/responseTime.js'][19]++;
  return (function (req, res, next) {
  _$jscoverage['middleware/responseTime.js'][20]++;
  var start = new Date();
  _$jscoverage['middleware/responseTime.js'][22]++;
  if (res._responseTime) {
    _$jscoverage['middleware/responseTime.js'][22]++;
    return next();
  }
  _$jscoverage['middleware/responseTime.js'][23]++;
  res._responseTime = true;
  _$jscoverage['middleware/responseTime.js'][25]++;
  res.on("header", (function () {
  _$jscoverage['middleware/responseTime.js'][26]++;
  var duration = new Date() - start;
  _$jscoverage['middleware/responseTime.js'][27]++;
  res.setHeader("X-Response-Time", duration + "ms");
}));
  _$jscoverage['middleware/responseTime.js'][30]++;
  next();
});
});
_$jscoverage['middleware/responseTime.js'].source = ["","/*!"," * Connect - responseTime"," * Copyright(c) 2011 TJ Holowaychuk"," * MIT Licensed"," */","","/**"," * Reponse time:"," *"," * Adds the `X-Response-Time` header displaying the response"," * duration in milliseconds."," *"," * @return {Function}"," * @api public"," */","","module.exports = function responseTime(){","  return function(req, res, next){","    var start = new Date;","","    if (res._responseTime) return next();","    res._responseTime = true;","","    res.on('header', function(){","      var duration = new Date - start;","      res.setHeader('X-Response-Time', duration + 'ms');","    });","","    next();","  };","};"];
