OCEAN CITY, Md. — There’s never a good time for a hurricane, but in Ocean City, now is about as good a time as any.

Many of the hotels, restaurants and bars that are the lifeblood of this waterfront resort town are closed for the season, and many visitors who were here had planned to leave Sunday anyway.

That leaves the locals in a city with a population of just around 7,000 readying businesses and homes to withstand Hurricane Sandy.

The residents of Ocean City generally serve as the spokes in the well-oiled party wheel that welcomes thousands come summer, serving drinks behind the bar or food in front of it, doing maintenance, construction and whatever else needs to be done to keep the place humming.

A combination of a fun, generally positive outlook combined with an experienced approach to potential calamity — residents have seen many storms come and go over the years — leave the small city preparing but hardly panicking.

“Look, we’ve had Nor’easters worse than this,” said Johnny Holt, 40, a bartender at The Cork Bar.

Last year, the city ordered mandatory evacuations during the height of tourist season when Hurricane Irene was supposed to make a direct hit. Locals say it was just another example of a lesson learned over the years: It’s impossible to predict the future. Especially when it comes to storms.

On Sunday, the city and the surrounding county ordered a mandatory evacuation of low-lying areas. Empty restaurants and half-filled bars show that many have left. But those who have stayed are not glib — they’re just experienced. They talk of wind directions and tidal movements, storms from decades ago and what seem to be perpetual Nor’easters, each billed as worst than the last.

One of the residents who will stay is City Council member Brent Ashley. He lives in a low-lying area but said his building is safe and he needs to be in town to deal with the emergency.

“The people that are here are year-round residents of many, many years,” Ashley said. “They’re familiar with the situation.”

Mike Strawley, owner of the Bearded Clam near the Cork Bar, said he’s prepared — storm shutters for his business will go down, he has moved his car to higher ground and he has supplies. But he sees no need yet to leave.

“You might as well sit and watch it get wet,” he said.

Where the boardwalk ends and land meets sea, cars snaked around the parking lot and many watched the sea foam get higher Sunday afternoon; while huge prolonged gusts of wind, sand, sea spray and rain pelted onlookers.

Chris Lynch, wearing a light jacket and shorts, was walking near a looming white skeleton of a long-stopped ferris wheel. He said a “morbid curiosity” had brought him to the shore, despite the worsening weather.

He’s keeping an eye on Sandy, he said, but it hasn’t yet impressed him.

Still, there’s always a chance things will take a turn for the worse. Holt, the bartender, said he’s planning to stay in his house, even though he’s been ordered to evacuate. But he won’t take many chances.

“If water starts coming in my door, I’m gone,” he said.