dist/myfunctions.js
/**
 * Increments a value once a second.
 * @customfunction
 * @param incrementBy Amount to increment
 * @param invocation Custom function handler
 */
Increments a value once a second.
@customfunction
@param incrementBy Amount to increment
@param invocation Custom function handler
Increments a value once a second . @customfunction @param incrementBy Amount to increment @param invocation Custom function handler
function increment(incrementBy, invocation) {
  var result = 0;
  var timer = setInterval(function () {
    result += incrementBy;
    invocation.setResult(result);
  }, 1000);
  invocation.onCanceled = function () {
    clearInterval(timer);
  };
}
function increment ( incrementBy , invocation ) { var result = 0 ; var timer = setInterval ( function ( ) { result += incrementBy ; invocation . setResult ( result ) ; } , 1000 ) ; invocation . onCanceled = function ( ) { clearInterval ( timer ) ; } ; }
Increments a value once a second.
Increments a value once a second .