simulator/lib/GG-Simulator.js
function JobQueuePost (job, callback) {
    // dummy job to activate jobqueue
    if (job === null) {
        callback ();
        return;
    } else {
        // force change to simulator context
        job.simulator.NewPosition.call (job.simulator, job);
    }
    // wait tic time before sending next message
    job.simulator.queue.pause ();
    // provide some randomization on tic with a 50% fluxtuation
    var nexttic = parseInt (job.simulator.ticms * (1+ Math.random()/2));
    setTimeout(function () {job.simulator.queue.resume();}, nexttic);
    callback ();
}
function JobQueuePost (job, callback) {
    // dummy job to activate jobqueue
    if (job === null) {
        callback ();
        return;
    } else {
        // force change to simulator context
        job.simulator.NewPosition.call (job.simulator, job);
    }
    // wait tic time before sending next message
    job.simulator.queue.pause ();
    // provide some randomization on tic with a 50% fluxtuation
    var nexttic = parseInt (job.simulator.ticms * (1+ Math.random()/2));
    setTimeout(function () {job.simulator.queue.resume();}, nexttic);
    callback ();
}
function JobQueuePost ( job , callback ) { // dummy job to activate jobqueue if ( job === null ) { callback ( ) ; return ; } else { // force change to simulator context job . simulator . NewPosition . call ( job . simulator , job ) ; } // wait tic time before sending next message job . simulator . queue . pause ( ) ; // provide some randomization on tic with a 50% fluxtuation var nexttic = parseInt ( job . simulator . ticms * ( 1 + Math . random ( ) / 2 ) ) ; setTimeout ( function ( ) { job . simulator . queue . resume ( ) ; } , nexttic ) ; callback ( ) ; }
Notice method is called by async within async context !!!!
Notice method is called by async within async context !!!!