summaryrefslogtreecommitdiff
path: root/script/brave
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-18 14:41:57 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-18 14:41:57 +0800
commitf9c45800068f2d75aa988af03a9e3017bc5dd72f (patch)
tree20957083f42e29736ff2ca8dc573f16bb3a1afe4 /script/brave
parentda9febfb5ea5972f3062063e987af18497bf43fe (diff)
downloadlua-language-server-f9c45800068f2d75aa988af03a9e3017bc5dd72f.zip
fix log time of sub threads
Diffstat (limited to 'script/brave')
-rw-r--r--script/brave/log.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/script/brave/log.lua b/script/brave/log.lua
index 18ea7853..d7c92b26 100644
--- a/script/brave/log.lua
+++ b/script/brave/log.lua
@@ -1,11 +1,12 @@
local brave = require 'brave'
+local time = require 'bee.time'
local tablePack = table.pack
local tostring = tostring
local tableConcat = table.concat
local debugTraceBack = debug.traceback
local debugGetInfo = debug.getinfo
-local osClock = os.clock
+local monotonic = time.monotonic
_ENV = nil
@@ -24,7 +25,7 @@ local function pushLog(level, ...)
msg = str,
src = info.source,
line = info.currentline,
- clock = osClock(),
+ clock = monotonic(),
})
return str
end