Could do, but why tie to time? What you actually trying to minimise is time spent queueing. So record when people arrive and apply a discount/surcharge depending on how long they queued (or just based on the number of people ahead of them in the queue).
Seemingly perversely, a long wait would imply a higher cost for the meal.
It's basically congestion charging based on queue length/time rather than time of day.