MCPcopy Create free account
hub / github.com/Tracktion/choc / setInterval

Method setInterval

choc/javascript/choc_javascript_Timer.h:102–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100 }
101
102 int64_t setInterval (uint32_t interval)
103 {
104 auto timerID = ++nextTimerID;
105
106 activeTimers[timerID] = choc::messageloop::Timer (interval, [this, timerID]
107 {
108 try
109 {
110 context.invoke ("_choc_invokeInterval", timerID);
111 }
112 catch (const choc::javascript::Error& e)
113 {
114 std::cerr << e.what() << std::endl;
115 }
116
117 return true;
118 });
119
120 return timerID;
121 }
122
123 void clearInterval (int64_t timerID)
124 {

Callers 1

registerTimerFunctionsFunction · 0.80

Calls 3

TimerClass · 0.85
invokeMethod · 0.80
whatMethod · 0.80

Tested by

no test coverage detected