From a8fe99388a88c3edf04f1c73b3805145c93f888e Mon Sep 17 00:00:00 2001 From: Mizore Date: Tue, 31 Jan 2023 18:42:20 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E9=80=9A=E7=9F=A5=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E4=B8=AD=E5=A2=9E=E5=8A=A0=E6=9C=AC=E6=9C=BA=E5=8F=B7?= =?UTF-8?q?=E7=A0=81=E5=92=8C=E5=BC=80=E6=9C=BA=E6=97=B6=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/util_notify.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/script/util_notify.lua b/script/util_notify.lua index 27d242f..d1d87b5 100644 --- a/script/util_notify.lua +++ b/script/util_notify.lua @@ -200,6 +200,24 @@ end local function append() local msg = "\n" + -- 本机号码 + local number = mobile.number(mobile.simid()) + if number then + msg = msg .. "\n本机号码: " .. number + end + + -- 开机时长 + local ms = mcu.ticks() + local seconds = math.floor(ms / 1000) + local minutes = math.floor(seconds / 60) + local hours = math.floor(minutes / 60) + seconds = seconds % 60 + minutes = minutes % 60 + local boot_time = string.format("%02d:%02d:%02d", hours, minutes, seconds) + if ms >= 0 then + msg = msg .. "\n开机时长: " .. boot_time + end + -- 运营商 local oper = util_mobile.getOper(true) if oper ~= "" then