nl_tokens: / * eslint - disable no - console
pl_tokens: function setupTimeoutCapture ( wrapperInstance ) { const { context , sendReport , config } = wrapperInstance ; const { getRemainingTimeInMillis = ( ) => 0 } = context ; // if getRemainingTimeInMillis returns a very small number, it's probably a local invoke (sls framework perhaps) if ( config . timeoutWindow < 1 || getRemainingTimeInMillis ( ) < 10 ) { return undefined ; } const maxEndTime = 899900 ; /* Maximum execution: 100ms short of 15 minutes */ const configEndTime = Math . max ( 0 , getRemainingTimeInMillis ( ) - config . timeoutWindow ) ; const endTime = Math . min ( configEndTime , maxEndTime ) ; return setTimeout ( ( ) => { context . iopipe . label ( '@iopipe/timeout' ) ; sendReport . call ( wrapperInstance , <mask> Error ( 'Timeout Exceeded.' ) , ( ) => { } ) ; } , endTime ) ; }