change activity with time

now youre making me doubt myself....

I defined "time" in the beginning:

unsigned long time = millis();

so I agree that I have no idea what I'm doing but it switched direction after 10 seconds...

far as I can tell I subtracted millis from millis.... but you said "try a difference in time" and it seemed to work