# HG changeset patch # User Matthew Wild # Date 1607522061 0 # Node ID 9b25eecde9e6ad085161d145f3ed325aa2abc458 # Parent 586a6ed6b0a6374f98c51c322f992e60f3f26926 net.http: track time of request for debug/stats purposes diff -r 586a6ed6b0a6 -r 9b25eecde9e6 net/http.lua --- a/net/http.lua Tue Dec 08 20:35:53 2020 +0100 +++ b/net/http.lua Wed Dec 09 13:54:21 2020 +0000 @@ -24,6 +24,7 @@ local pairs = pairs; local tonumber, tostring, traceback = tonumber, tostring, debug.traceback; +local os_time = os.time; local xpcall = require "util.xpcall".xpcall; local error = error @@ -221,6 +222,7 @@ req.url = u; req.http = self; + req.time = os_time(); if not req.path then req.path = "/";