code: function(func, wait) {
          var self = this,
              timeout,
              // args, // right now there is no need for arguments
              // context, // and for context
              timestamp
              // result // and for result
  
          var later = function() {
              if (self._disposed) {
                  clearTimeout(timeout)
                  timeout = self = null
                  return
              }
  
              var last = getTime() - timestamp
  
              if (last < wait && last >= 0) {
                  timeout = setTimeout(later, wait - last)
              } else {
                  timeout = null
                  // result = func.apply(context, args)
                  func()
                  // context = args = null
              }
          }
  
          return function() {
              // context = this
              // args = arguments
              timestamp = getTime()
  
              if (!timeout) {
                  timeout = setTimeout(later, wait)
              }
  
              // return result
          }
      }
docs: underscore.js realization used in autoUpdate plugin