MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / xs_timer_schedule

Function xs_timer_schedule

modules/base/timer/modTimer.c:113–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void xs_timer_schedule(xsMachine *the)
114{
115 int argc = xsmcArgc;
116 modTimer timer = xsmcGetHostDataValidate(xsArg(0), (void *)&modTimerHooks);
117
118 if (1 == argc)
119 modTimerUnschedule(timer);
120 else {
121 int interval = xsmcToInteger(xsArg(1));
122 int repeat = (argc > 2) ? xsmcToInteger(xsArg(2)) : 0;
123 modTimerReschedule(timer, interval, repeat);
124 }
125}
126
127void xs_timer_clear(xsMachine *the)
128{

Callers

nothing calls this directly

Calls 2

modTimerUnscheduleFunction · 0.50
modTimerRescheduleFunction · 0.50

Tested by

no test coverage detected