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
elseif
os.date("%M:%S")=="30:00"
then
service.speak(os.date("%H:%M:%S").."")return true
end
end
ti.start()
service.speak("已开启了半点报时")return true