There is no time limit for the written test, you may take as long as necessary. However, the DMV may require you to turn in your written test around the time the office closes. In addition, the DMV may stop giving tests 30 minutes before the office closes.