# encoding: utf-8 $threads.getMain().getTimer().setTimeout(lambda { |p| $console.log("一秒后执行") $threads.sleep(1000) $console.log("再一秒后执行") }, 1000) $threads.sleep(1000) $console.log("一秒后执行")