Artifact Content
Artifact 20a0821ce489eb995c5cf06672dab6b9ee67979edaca648f4ed3a2d9207e6ea2:
- File public/riot-3.13.2/test/tag/timer.tag — part of check-in [12a9bb700d] at 2021-08-11 18:56:04 on branch trunk — Import from git Added a changelog (user: dev size: 320)
<timer> <p>Seconds Elapsed: { time }</p> this.time = opts.start || 0 tick() { this.update({ time: ++this.time }) if (this.opts.ontick) { this.opts.ontick(this.time) } } var timer = setInterval(this.tick, 1000) this.on('unmount', function() { clearInterval(timer) }) </timer>