The play is set in the bustling Greek city of Ephesus, which serves as a crossroads of sorts for all sorts of trade and activity. The geographical setting of a busy city is an ideal place for all the characters to coincidentally collide. Within the city, the play takes place in three central locations: the mart (or marketplace), the area surrounding E. Antipholus’s house, and the area surrounding the priory. The three-part setting leads to interesting staging for the play. Often, the play is predicated upon having inside and outside spaces, so characters can all be in the same space, but not see each other, while all players remain visible to the audience. Sometimes the stage is designed as a "triptych," where all the points of the play are visible at one time, even if they’re not all being used. This is an important aspect of Shakespeare’s decision to have this play conform to the three classical unities of time, place, and action. The Comedy of Errors is one of two Shakespeare plays that employs the unities (the other being his final play, The Tempest), and because the unities of time and action are in play, the unity of place can feature centrally as well, with the most important parts of Ephesus laid bare to the audience.
Time as a set piece functions interestingly, too – the play all occurs in the space of one day, from morning (when Egeon is sentenced to die) to sunset (when his execution should be carried out). The miracle of exposition (or explanatory speech) fills us in on everything that’s happened before – Egeon explains the history of his family – without showing us the actual action. Still, by relying on explanation, and not actual flashbacks or scene changes, we see a lifetime take place over the course of a day.
Timing is tricky in the play, though, so don’t be fooled. Egeon says his son left when he was eighteen, and Egeon says he’s wandered Asia for five summers; but when he meets E. Antipholus (thinking he’s S. Antipholus) he says the boy has been gone for seven years. When Aemilia arrives, she adds that it’s been 33 years of travails for her, which might be her referring to her whole life as a travail, or simply another example of the play’s inaccuracies. So, Egeon’s missed one of his sons for 23 to 25 years, and the other for 5 to 7 years, and Aemilia’s missed both her children for who-knows-how long (and Adriana must be older than her husband, unless women aged more dramatically way back when).
Regardless, it’s been a long time, and for all of that lost time to be resolved and tied up in the course of one day takes some pretty remarkable set-work on Shakespeare’s part. Shakespeare even points out the strangeness of this timing in the scene between S. Dromio and Adriana in Act 4 Scene 2. S. Dromio jokes that hours are moving backwards, and we can imagine that with so many years to resolve, how the hours move (and even how the years have moved) towards this resolution is less important than the fact that the resolution finally occurs.