 class Scaler
   constructor: (@source) ->
     @last = @sinceLastUpdate = 0
-    @rate = 0.03
+    @rate = options.initialRate
     @catchup = 0
     @progress = @lastProgress = 0
 

        catch e

        if size?
          # This is not perfect, as size is in bytes, length is in chars
          try
            @progress = request.responseText.length / size
          catch e

defaultOptions =
  # How long should it take for the bar to animate to a new
  # point after receiving it
  catchupTime: 500

  # How quickly should the bar be moving before it has any progress
  # info from a new source in %/ms
  initialRate: .03

  # What is the minimum amount of time the bar should be on the
  # screen
  minTime: 500

  # What is the minimum amount of time the bar should sit after the last
  # update before disappearing
  ghostTime: 250

  # How frequently in ms should we check for the elements being tested for
  # using the element monitor?
  elementCheckInterval: 100

  # Its easy for a bunch of the bar to be eaten in the first few frames
  # before we know how much there is to load.  This limits how much of
  # the bar can be used per frame
  maxProgressPerFrame: 10

  # This tweaks the animation easing
  easeFactor: 1.25

now = ->
  performance?.now?() ? +new Date
