output timer - help needed.

I have a question.

does anybody know how i can output to a port for a certain amount of time (eg. 5 seconds) without having to use costates?

for eg.

BitWrPortI(PGDR, &PGDRShadow, 0, LED_DS2);

but for 5 seconds…?

Thanks in advance.