code: public static EventStream<Long> animationFrames() {
          return animationTicks()
                  .accumulate(t(0L, -1L), (state, now) -> state.map((d, last) -> {
                          return t(last == -1L ? 0L : now - last, now);
                  }))
                  .map(t -> t._1);
      }
docs: Returns a stream that, on each animation frame, emits the duration
  elapsed since the previous animation frame, in nanoseconds.