Controlling a DC motor for a certain amount of time

Thanks to you both, i'll continue trying, and also look into the 'finite state machine', and come back with a reply.
P.S. Also, i specified the fact that i looked into the 'blink without delay', and i'll use code tags from now on.