 # Doing this gets us two things:
 #
 # 1) An `expiration` shadow variable. When the timer methods run in an instance
-#    of ShadowScope, they will reference the most-local, shadow copy of
+#    of ShadowScope, they will reference the most-local shadow copy of
 #    @expiration. This allows us to adjust the block expiration in nested
-#    calls.
+#    calls and "unwind" the value as we exit nested scopes.
 #
 # 2) A version of `this` that will still resolve instance variables. If you
 #    define any variables using `this` they will be accessible in other timer

audio rendering allowing you to modify your environment with sample-level
time resolution.

It's recommended you use the DSL provided in buildTrack(), which simplifies the
process of creating short-lived loops by managing the registration and
unregistration of callbacks for you.

See `@every()`, `@after()` and `@until()` methods here:
https://emcmanus.gitbooks.io/tinyrave-libraries/content/timers.html

The timer is optimized to handle 1000's of callbacks. (Useful for tracks that
front-load the scheduling of notes, like when using the MIDI adapter.)
###
class TinyRaveTimer
  constructor: ->

      @time = time
      if @time >= @nextThreshold
        @fireCallbacks()
        @updateThreshold() # B/C descriptors reset their registration time when isLoop = true
    else
      throw new Error "Time invalid."
    time
