Really depends on the restaurant, and how busy it is. If it's a place that is cook to order (especially a more high-end place) it can take at least 30 minutes to get your food (sometimes longer if it's really busy). However at anytime you can always ask your server for the status, and if you feel that it's been too long, you can also talk to the manager.
In most cases a long wait isn't always the issue, I've been to plenty of places where it took forever to get the food, but if you have a good server, then they will keep your drinks refilled and the breadsticks coming to help compensate for the delay. If you're having a really long wait, and your server (or the manager) is nowhere to be found, then it's up to you, but if it's been more than 45 minutes to an hour, I'd say you are within your rights to leave. Especially if no one is bothering to acknowledge that there is a delay.