nl_tokens: a b c d e Int : a b ( c d - > * ) ( e d - > * ) - > timer
pl_tokens: function PingPong ( intervalMs , retryLimit , <mask> , onTimeout ) { if ( typeof intervalMs !== 'number' || intervalMs < 0 ) throw new Error ( 'intervalMs must be an integer >= 0 but was:' + intervalMs ) ; if ( typeof retryLimit !== 'number' || retryLimit < 0 ) throw new Error ( 'retryLimit must be an integer >= 0 but was:' + retryLimit ) ; // Create a timer object that will be // an event emitter with addition properties // for state and configuration settings. var timer = { } ; timer . conf = { ping : ping , onTimeout : onTimeout , intervalMs : intervalMs , retryLimit : retryLimit } ; timer . state = { intervalTimer : undefined , receivedPong : false , retryCounter : Counter ( retryLimit ) , roundsCount : 0 } ; // Its possible that given a very small // intervalMs (0 for example) that the // return timer will not be setup in time // for execution of ping. // // An example problem is that // ping would use the closure to // pingPong.clear(timer) only to find that timer // is, confusingly, still undefined. setImmediate ( _start , timer ) ; return timer ; }