I just posted a reply in a different thread that
almost applies to your situation.
It's not exactly what you're looking for, but it involves writing code that runs in TeleOp, but takes longer than the 20msec main-loop time. It involves using shift registers to provide feedback from loop-to-loop in your teleop routines.
Here's a
link to that thread.