Skip to content

Commit

Permalink
feat(core) update nginx time cache in each phase
Browse files Browse the repository at this point in the history
  • Loading branch information
james-callahan committed May 24, 2018
1 parent 36bdbf4 commit 0b110e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kong/runloop/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ local ngx = ngx
local log = ngx.log
local null = ngx.null
local ngx_now = ngx.now
local update_time = ngx.update_time
local re_match = ngx.re.match
local unpack = unpack

Expand All @@ -45,6 +46,7 @@ local server_header = _KONG._NAME .. "/" .. _KONG._VERSION


local function get_now()
update_time()
return ngx_now() * 1000 -- time is kept in seconds with millisecond resolution.
end

Expand Down

0 comments on commit 0b110e7

Please sign in to comment.