解说社区

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 854|回复: 1

[分享] --分享插件,整点报时_重启了之后得重开插件不要全部停止

[复制链接]
发表于 2020-6-29 13:45:33 来自手机 | 显示全部楼层 |阅读模式
本帖最后由 yph 于 2020-6-29 13:51 编辑

require "import"
import "com.androlua.Ticker"
if ti then
ti.stop()
service.speak("整点报时已关闭")
  ti=nil
return true end
ti=Ticker()
ti.Period=900
ti.onTick=function()
if
os.date("%M:%S")=="00:00"
then
service.speak(os.date("%H:%M:%S"))return true

end
end
ti.start()
service.speak("已开启了整点报时")return true
回复

使用道具 举报

发表于 2020-6-29 16:27:22 来自手机 | 显示全部楼层




  来自解说社区客户端
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|解说社区

GMT+8, 2024-4-29 08:19 , Processed in 0.049851 second(s), 13 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表