MCPcopy Create free account
hub / github.com/ptmt/react-native-macos / burnCPU

Function burnCPU

Examples/UIExplorer/js/TimerExample.js:38–41  ·  view source on GitHub ↗
(milliseconds)

Source from the content-addressed store, hash-verified

36var performanceNow = require('fbjs/lib/performanceNow');
37
38function burnCPU(milliseconds) {
39 const start = performanceNow();
40 while (performanceNow() < (start + milliseconds)) {}
41}
42
43class RequestIdleCallbackTester extends React.Component {
44 state = {

Callers 2

TimerExample.jsFile · 0.85
renderMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…