Skip to content

Commit 698d7de

Browse files
authored
optimization: remove NYI call.
1 parent 407000a commit 698d7de

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/resty/core/time.lua

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,14 @@ end
7272

7373

7474
function ngx.now()
75-
return tonumber(ngx_lua_ffi_now())
75+
local now = tonumber(ngx_lua_ffi_now())
76+
return now
7677
end
7778

7879

7980
function ngx.time()
80-
return tonumber(ngx_lua_ffi_time())
81+
local time = tonumber(ngx_lua_ffi_time())
82+
return time
8183
end
8284

8385

@@ -168,7 +170,8 @@ function ngx.parse_http_time(time_str)
168170
return nil
169171
end
170172

171-
return tonumber(res)
173+
local time = tonumber(res)
174+
return time
172175
end
173176

174177
end

0 commit comments

Comments
 (0)