You could use the WPI
Notifier Class (Anyone know if there is a Java equivalent and details on how to use it?)
The upside of using an Notifier is it uses timer interrupts and handlers rather than polling/waiting yourself
To use you could init the Notifier with a TimerEventHandler that reverses the motor. Every time you want to fire, set the motor forward and call StartSingle(delay) for the Notifier (make sure to only do this once per cycle).