I think in a matter of decades, but there would need to be some reason to make them. After all we could make viable "sea cities" floating on the sea, or "Cloud nine" cities floating in the sky, or cities in deserts, but it's much easier to just build and extend the existing cities on the land.
So - well a Stanford torus is far harder to build than any of those. So you need good reason to build something in space rather than on the Earth.
Maybe asteroid mining. But it might be that this can all be automated. E.g. a technique for extracting nickel from asteroids, the Mond process - can leave out the first step as it's nickel already not nickel oxide - and so just
2. The impure nickel reacts with carbon monoxide at 50–60 °C to form the gas nickel carbonyl, leaving the impurities as solids. Ni(s) + 4 CO(g) → Ni(CO)4(g)
So someone recently did a spaceshow talk about this - the idea is to just enclose a nickel rich asteroid in a bag, heat it up to 60 degrees c, and then you can condense out the Nickel with the stage 3 of the process and take that away to mine the asteroid.
Something like that might mean you can mine an asteroid with hardly any human presence. That just works for nickel, only metal that forms gases so easily at such low temperatures.
Same also for space based solar power, which was the original motive for the Stanford torus. Nowadays I think you'd create solar mirrors in space to concentrate the solar energy for power generation so that they unfold automatically or you put then together from Earth via telerobotics and wouldn't need humans in orbit to do that.
So - I think the Stanford Torus is rather a solution in search of a problem to solve at present. And can't see space colonization happening myself in the sense of people just going out there and setting up home as they did when exploring the Earth with present day technology just because nowhere in space is anywhere like as hospitable as e.g. the Earth deserts, or shallow sea floor or even the atmosphere, colonies floating in our skies.
So, until we get to the situation, if we ever do, that the seas and deserts and even our skies are filled with colonies of humans, I can't see us having any real incentive to colonize anywhere outside of Earth.
And if we have robotic mining, then may not need colonies for that also.
But eventually perhaps we'll get to the point where we have thousands, even tens of thousands of people in space, then it would make sense to have space colonies.
For that matter, tourism also, a Stanford Torus with say 10,000 residents - it could pay its way just as an exotic location to visit, perhaps, if easily accessible from Earth. With billions of humans to pay for it by tourism etc.
I.e. - if it was colonization you are talking about millions and eventually billions of people in space, and I can't see that happening, in near future at least, just because everywhere in space is so inhospitable compared to the Earth.
The analogies of exploration and colonization on Earth don't work in my view, after all nobody colonized Antarctica. And don't have large scale colonization of Greenland. Or the deserts, or the mountain tops or the sea bed. Very few people live in the Arctic or Siberia though again far far more hospitable than space settlements anywhere outside of Earth. And none of those habitats require you to make your own air to breath. Even with technology to live on the sea floor, nobody is actually colonizing the sea bed because it is so much easier to live on the land, where, apart from anything else, you never need to think at all about how you are going to get enough oxygen to breath or how to deal with noxious gases and microbes that can build up in a totally enclosed habitat with no ventilation.
So space I think is like that. Even the ideas for Venus cloud colonies which I think in many ways is the most easily "habitable" region of our solar system for humans outside of Earth - but nowhere like as habitable as anywhere on Earth.
But for tourism, adventure, exploration, scientific study, then, especially as it gets easier to get into space - a population of billions of humans could easily support thousands, tens of thousands or more people in space eventually for space settlement, so that's getting into numbers where large space settlements and eventually a Stanford Torus might well make sense.
If the motivation is there well the original idea for the Stanford Torus was to build it within a few decades. Starting in the 1970s then by now we'd be onto our third or fourth Stanford Torus probably, and growing exponentially, if their economic model had worked, of using them to create solar power stations in orbit to export power to Earth.
And that was a reasonably carefully worked out plan, using 1970s technology. So with modern technology I would think best guess would be, at most a couple of decades or so, possibly less.
The way they planned to do it was to send a small bulldozer to the Moon and set up a mass driver, and the bulldozer digs up a small patch of the Moon (surprisingly little is needed) to create the thick outer skin of solar radiation protection material. That's the heaviest part of the habitat. Mainly automated even then and now would be pretty much totally automated. So it's just the cost of sending a bulldozer and a mass driver to the Moon as the main startup cost for the cosmic radiation shielding. So - far easier to do than you might think if you expect you have to lift all the mass from Earth. Nowadays perhaps you'd also alternatively use a Near Earth Asteroid as the source for the bulk mass for the habitat.
And construction also - if you do it close to Earth - could use telerobotics and do the construction from Earth, I expect that would cost a lot less than using astronauts in situ - and also be far safer, nobody endangered if anything goes wrong, pretty much until it is ready to occupy.
There that is just for the physical construction of the habitat - they assume that we will be able to sort out how to make a closed system habitat. A bit hard to say how easy or difficult that is, since we haven't yet made one or anything like it. But with a couple of decades of intensive research on that also as you build the habitat, I'd have thought a reasonable chance, though you'd be best planning for the possibility that your attempts might go wrong and a lot of experimentation along the way, along the lines of Biosphere II and the Russian experiments with algae, etc. Probably smaller habitats first with reasonably closed systems and relying on biology more and more and less and less on machines and filters etc might be a good idea.
And for that matter, we don't yet know the "gravity prescription" for animals, humans and plants. We only have experience of zero g and full g.
What for instance if humans are perfectly healthy at lunar gravity?
Or, what if, for instance, plants can do fine even in a hundredth of Earth gravity - then it would be silly to build the entire torus around full g, when most of it is for plants whgo only need a hundredth g, far far easier to construct.
If that was the case you could have a Stanford Torus for plants, rotating slowly at 1/100 g, and within it, smaller habitats for the humans that are under full g. And - what if we just need full g at night, or for an hour a day?
So, before we build our Stanford Torus I think the first step is to do lots of experiments in artificial gravity Find out the "gravity prescription" for humans, animals and plants, also spin tolerance for humans (not necessarily same as spin tolerance on Earth in centrifuges as different parts of the ear are stimulated when you have artificial gravity by rotation about an axis above your head - and because our experiments on Earth always involve hyper gravity can't simulate spinning which generates only Earth gravity or less than full g).
So - I'd see it as more of a gradual process, say a decade or so of building smaller closed systems in space, experimenting in artificial gravity - and learn enough to know how to design a Stanford Torus. Which you could then probably build quite quickly, much like you would build say a big bridge or a large skyscraper on the Earth especially once we have more heavy lift capacity into space and more experience of robotic mining and telerobotics in space.
As for an idea of what it might be like, here is an "artist's impression"
It would need to be totally enclosed like that - couldn't hold in the atmosphere with just a retaining wall, not in a reasonably small sized Stanford Torus.