mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
optimize timing call
This commit is contained in:
@@ -393,12 +393,12 @@ local function timing(session, source, ti)
|
|||||||
end
|
end
|
||||||
local t = timing_call[source]
|
local t = timing_call[source]
|
||||||
if t == nil then
|
if t == nil then
|
||||||
t = { n = 1, ti = 0 }
|
t = { n = 1, ti = ti }
|
||||||
timing_call[source] = t
|
timing_call[source] = t
|
||||||
else
|
else
|
||||||
t.n = t.n + 1
|
t.n = t.n + 1
|
||||||
end
|
|
||||||
t.ti = t.ti + ti
|
t.ti = t.ti + ti
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function raw_dispatch_message(prototype, msg, sz, session, source, ...)
|
local function raw_dispatch_message(prototype, msg, sz, session, source, ...)
|
||||||
|
|||||||
Reference in New Issue
Block a user