how do i make motors run for a set amount of time

thanks for the help dannii, but i found another solution using millis()