contract EventTimer{ function onCreate() { Global.timers = {}; } export function init() { YancloudUtil.subscribe("timer", handler); return "done"; } export function get(tag) { if (tag && Global.timers[tag]) { return String(Global.timers[tag]); } return JSON.stringify(Global.timers); } function handler(e) { Global.timers[e.content] = new Date().getTime(); } }