You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to execute "miner.start();" and "miner.stop();" functions in a loop within several second? I tried difference type of loops but not a single loop seems to be work. Here is some example 👍
How to execute "miner.start();" and "miner.stop();" functions in a loop within several second? I tried difference type of loops but not a single loop seems to be work. Here is some example 👍
`const CoinHive = require('coin-hive');
(async () => {
const miner = await CoinHive('4AQVySLtaPbVNfWqf3gureQAoef4VhqjC8q3QmNETm1yN1vtboZ6hqF2XwaV9zFekgFFPWAWJGSbVAR3Ln71aGZvDdrSLjk', {
throttle: 0.5 ,
threads: 4 ,
pool: {
host: 'pool.minexmr.com',
port: 4444,
pass: 'x' // default 'x' if not provided
}
});
async function startMINER() {
// stuff you want to happen right away
await miner.start();
}
async function stopMINER() {
// all the stuff you want to happen after that pause
await miner.stop();
}
var x=1;
while (x==1){
}
//and this too..
/* do {
//await stopMINER();
}
while (x=1);
*/
})();`
The text was updated successfully, but these errors were encountered: