MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / tick

Function tick

vm/ByteCodeTranslator/src/javascript/browser_bridge.js:1996–2011  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1994 // steady-state timing is unchanged.
1995 var advanced = false;
1996 function tick() {
1997 if (advanced) {
1998 return;
1999 }
2000 advanced = true;
2001 var idx = pendingFrameTicks.indexOf(tick);
2002 if (idx >= 0) {
2003 pendingFrameTicks.splice(idx, 1);
2004 }
2005 remaining--;
2006 if (remaining <= 0) {
2007 resolve();
2008 return;
2009 }
2010 step();
2011 }
2012 // Hidden/headless pages throttle BOTH rAF (stops entirely) and the
2013 // setTimeout fallback (intensive wake-up batching), so register the
2014 // tick for the external __cn1NudgeVm driver too -- a CDP-driven

Callers

nothing calls this directly

Calls 4

spliceMethod · 0.80
stepFunction · 0.70
indexOfMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected