Algorithms for Timing and Sequencing Behaviors in Robotic Swarms