Added support for spinLoops and spinDuration.

Reviewer: @aogilvie