1.0.1 • Published 2 years ago

nikolav-ticker v1.0.1

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

ticker.js, .setTimeout() wrapper

API

init

Ticker ticker(float delay = 1000, int repeatcount = Infinity)

var t = ticker(1000 / 10, 5);

cache a function

Ticker .tick(function func)

t.tick(func);

call

Ticker .start((any) setup)

t.start();

pause

Ticker .stop(void)

t.stop();

cancel

Ticker .reset(void)

t.reset();

query state

Object .state(void)

console.log(t.state());

cleanup

void .destroy(void)

t.destroy();