I'd recommend using a CommandGroup and using its timeout function.
Let's say you have a command for AutoDriving called AutoDrive that takes parameters for left and right speeds.
In the CommandGroup, you'd write something like this:
PHP Code:
addSequential(new AutoDrive(1.0,1.0), 3.0);