Foreigners used to be the only ones whose timing went loco when they tried to organize their lives in Madrid.

They would go to a restaurant at 1 p.m. for lunch and find nobody there but the waiters. They would turn up again at 9 p.m. for dinner and dine alone. They would get to the theater too late for the early show and too early for the late show. The stores would open when they were ready to eat and close when they wanted to shop.

After a few days of this, visitors would realize that Madrilenos ate twice and slept twice on most days, instead of eating three times and sleeping once. In Madrid, morning ended at 2 p.m., afternoon faded into evening at around 10 p.m. and the night -- the night was endless. A stranger trapped in this time machine slept too much and was always tired, ate too much and was always hungry.

Madrid still mixes up foreigners. But its tempo has slipped out of sync since Spain started going modern a couple of decades ago. Now, Madrid mixes up the locals, too. Some people still take their siesta. Others take a long break but don't sleep. Some have switched to the hours of northern Europe. Others are somewhere in between. Unlike the residents of more predictable cities, everyone in Madrid seems to move about in a time zone of his own.

"People phone from outside the country and can't reach anybody," says a businessman in a bar off the Plaza Mayor at 8 p.m. on a weekday "afternoon," the time of day that traditionalists reserve for a meal to tide them over until dinner: "It's maddening. You never know what's open and what's closed anymore."

He sits at a table with his back to the window, drinking coffee and eating toast and jam. Up at the bar, the crowd drinks wine and brandy and jabs toothpicks into tapas -- olives, cheeses, chorizos, roasted peppers, marinated mushrooms and pickled sardines. Strollers out on the plaza sweep past the window, taking part in the day's paseo.

"Time is god now," the businessman says. "Everything is fast. There are new values: hard work, efficiency, success. Today I arrived at a restaurant for lunch at 10 past 4. I couldn't believe it. They said the kitchen was closed."

He checks his watch. It's nearly 9 o'clock. Downing his coffee, he rushes off to meet someone for a drink before dinner.

Madrid's timetable never did make much sense in a city that gets really hot only a few months of the year. Sociologists don't know why, but they say its origins are urban, not rural, and less than 100 years old. When Madrid was small, a midday ride home for a meal and a snooze seemed pleasant. In a city of 4 million, it can seem silly. But many people here feel torn between the vigor of their present and the grace of their past.

Stately boulevards still parade to elegant parks in Madrid; fountains still play in the plazas. Doctors give appointments for 9 p.m. Television shows a soccer game at 1 a.m. For two weeks in May, at the start of the bullfight season, the banks close at noon. And in the summer heat, Madrid switches to "intensive days" -- everybody quits at 3 p.m.

Official dinners here stretch into morning, and politicians hold meetings when dinner is over. Executives work from 9 a.m. to 7 p.m., with a standard three-hour lunch that begins with the sherry, moves to the wine, then to the brandy. By 5 p.m., bolstered by a parting scotch, they struggle back to their desks.

"In business, decisions are made eating," says Luis-Eduardo Cortes, the owner of the Jockey, one of Madrid's classier restaurants. "Why so? Because we don't use our time very well. We are too busy."

On the Gran Via, as the lunch break begins one day, porters lock the gates of office buildings and clerks pull grates across the shopfronts. Workers mob the bus stops. Shoppers look into darkened display windows. At a busy corner, fluted-marble columns support the glass and grillwork marquee of what was once Spain's fanciest jewelry store. Now it's a McDonald's.

That's revolutionary. But inside, the tables stand far apart, and nobody waits in line. A well-dressed woman sits reading, shopping bags propped against the column beside her.

"I'm waiting for my husband," she says. "We won't eat here. We'll go to a real restaurant. Of course, I'd rather keep on shopping. That's why I came to town. But in Spain we need this long break. How else would people get home for lunch?"

Right. Even the diehards, though, can have their fill of four rush hours a day. Businessmen can get fed up as well. "Lunch itself shouldn't be a job," one says. Workers who don't commute, don't eat and can't shop spend several hours every afternoon doing nothing. They have no place to sleep, yet they still work late and stay up late. So, a lot of people in Madrid are tired all the time.

"Everybody is frazzled," says an American banker who lives here. "They're always in a slightly bad mood."

The housewives of Madrid used to pick up the kids from school at midday, feed them and take them back. Now housewives work and maids are hard to find. So the children of the maidless hang around school while their parents mark time in the city.

The people of Madrid long to lend their life style some logic. But their spirit of reform sometimes suggests a mythical land that tried to go from left-hand to right-hand drive in stages.

When television tried to induce earlier dinners by moving the 9 o'clock news to 8:30, everybody who was anybody started watching the 11:30 news. Commercial theaters insist on mounting two shows a night, even though state theaters have switched to one. Actors consider one show a great luxury. But unions representing clerks in small shops consider their optional nap time in midday akin to a civil right.

At the headquarters of Spain's largest construction company, Dragados y Construcciones S.A., workers now clock in at 8 a.m. and leave at 4 p.m. It looks like progress. Yet they get only 20 minutes to eat, standing up, at a snack bar. So most of them get home about 5 o'clock, have a decent lunch and settle down to dinner somewhere near midnight.

Ever so slowly, nevertheless, Madrid is moving into the fast lane. A sign on a side street in English and neon hints at that. "Squash Club," it says. The city's first, it has eight courts, and during the long break one weekday, they are packed. Concha Galatas, a blond in a red sweat suit, demolishes her opponent and comes out panting.

"Most of us who play here don't have lunch," she says. "We feel very superior. I don't stay up late. My friends laugh at me. I'm in bed before they eat dinner."

El Corte Ingles, Spain's biggest department-store chain, frustrates its workers' instinct to eat late by stuffing them with a bargain-rate three-course meal during a half-hour break. The chain snubs the unions, too, and stays open all day. "I work in a shop," says a woman weeding through a dress rack in one of the chain's stores at 3 p.m. "This is my only chance to go shopping."

In a bar behind the Prado at noon on another day, four elevator repairmen finish a quick meal. After the energy crisis, Spain's factories began working northern hours to save power. Now the practice has spread to service workers in the city.

"This is lunch for us," one of the men says as the bartender passes him the bill. "We have no time to go home. It's nice. We quit early. We get plenty of sleep at night."

"The siesta?" says the man behind the bar. "That's something from our history."

The men leave, walk to their cars and drive away, past an apartment house where a painter, stretched out on the marble steps, lies fast asleep in the sun.