I'll defer the answer to how long for an ocean to freeze over to Kingledion. There's no flaw in his answer. The next question becomes, how do you get a 10-year eclipse?
Well... you can't. First of all, please read this excellent answer at astronomy.SE. It talks about this, too, and comes to the same conclusion.
Problem #1
Assume the inner planet is 4X the diameter of the earth. It could have an orbit just a hair faster than Earth's that would let it cause an eclipse of 10 years (0.5 earth diameters/year faster than Earth). When you work out how much faster that it must orbit (convert orbital distance of Earth to units of "earth's diameter", call it "a", add 0.5 and call it "b", b/a kinda equals new period in terms of one year) and then play with this unbelievably cool orbital time calculator what you'll discover is that the center of a planet being 4X the diameter of the Earth must pass within (I kid you not) 418 miles (read that again) of the center of the Earth. Yup, they collided.
You could try to play games to make that work, but what you'll quickly discover is that the smaller you make the inner planet the closer it must be to the centerline of Earth's orbit to create the 10-year effect. You can't get any smaller than the diameter of the Earth or you won't have 100% occlusion. Ugh.
I'd like to point out that even if this did work, it would only happen once every bazillion years. It would be a bit impractical.
Problem #2
Let's try this from another angle. From here we learn the estimated umbral diameter (the shadow on the Earth) is...
$$\begin{align}
Ud = \frac{2(mS - Ms)}{S - M}
\end{align}$$
Where
- m = inner planet radius
- M = distance of inner planet from outer planet
- s = sun radius
- S = sun distance from Earth's surface
We want Ud = Earth's diameter = 12,742 Km. Let's assume a better 0.8au (Venus is 0.72au) and find out how big it must be and how long the eclipse can be.
$$\begin{align}
6,371 = \frac{m(149,600,000) - (29,920,000)(695,700)}{149,600,000 - 29,920,000}
\end{align}$$
m = 144,237 Km or more than 18X the diameter of the Earth. To give you an idea, Jupiter is only about 11X the diameter of the Earth. At 0.8au we have an orbital period of 0.72 year and, if my assumptions are correct (they might not be), an eclipse of about 12-16 hours with a "total blackout" of about 8 hours.
And that's the problem.
It's equivalent to the Transit of Venus if Venus were on a level plane with Earth's orbit and twice the diameter of Jupiter.
A nice side note
It appears you could have a super gas giant inside the orbit of Earth. Astronomers found a gas giant orbiting very close to a small star.
The planet in question (HATS-6b) weighs in at approximately the mass of Saturn, or 100 times the mass of Earth. But because of its close orbital distance, the star’s heat has caused HATS-6b’s gas to billow out, inflating the planet like a hot air balloon to the size of Jupiter. With an orbital period of just 3.3 days, astronomers say HATS-6b is significantly closer to its star than the much smaller Mercury is to our Sun.
Did you see that orbital period? 3.3 DAYS. Granted, it's closer than Mercury, but it means you could have a gas giant, or even a super gas giant, inside the orbit of earth. One large enough to complely occlude the sun from the entire planet. It wouldn't last 10 years...
But you would see it about 5 times every 4 years and it would cause wild-and-crazy weather during the "day of the long night." It would slow the earth down as it approached the eclipse and then speed it back up after (assuming it didn't drag Earth into becoming one of its moons...).
It's not the kind of cool you're looking for, but how cool is that?