In D&D 5e, how long does it take to attempt to make the DC 20 Strength check to break manacles (or Dexterity check to try to escape)? Is it just one action? (If so, manacles don't seem that useful unless you are standing there watching your captive all the time, since even a creature with no Strength or Dexterity bonus could break it in an average of 2 minutes).
It is an action to break a grab, it would be the same to break out of restraints.
Miniman's illustration of Morpheus is a great example of this. Breaking or escaping manacles is a relatively quick process for an adventurer. A Fighter is just going to flex his muscles and strain a bit and the chain will break. The rogue is going to flex her fingers and wiggle free (or pick the lock, disadvantage if they are trying to pick their own handcuffs).
There's no reason to charge more than an action for breaking of manacles. Consider for a moment that they have 15 Hp, that's about what 1 attack does on a crit and manacles are likely incapacitated.
It should be noted, that if you think this is not a difficult task, that a 20 strength check is not easy, there is no skill qualifier, so there is generally no proficiency bonus. So at most your average character with a 20 strength score, is going to have to get a 15 and a normal character has to crit (exceptions are the Bard, and Champion fighter who get half prof to non prof checks in all, and specific abilities respectively). That seems about right to me.
As far as how many rounds it will take on average to break a set of manacles...We'll look at Str +0, +3, +5 and +8. Those seem to be likely common str check modifiers.
That looks pretty good to me. It's not easy, but it's doable for a heroic character.
The problem you are describing is a problem with many DnD actions, regardless of edition. Basically, if there is no penalty for failure, and an attempt doesn't take very long (say a round), any character who could feasibly do something will do something in roughly two minutes or less, simply by trying over and over.
The same holds true for bashing open a door, spotting a trap, etc, players will simply roll over and over until they get it right. If there is no penalty for failure, you just keep trying.
The solution would be fairly simply, attach either a penalty or a duration to the action. If it takes an hour per attempt, you are looking at far more reasonable times for a person to break free from manacles. Alternatively, if they seriously injure themselves with the attempt they may very well be persuaded from not trying to do it again.
As written, manacles are not very useful for long-term containment of adventurers...not on their own, anyway. But manacles are never an all-in-one containment solution anyway; they're only intended to resist being broken long enough for the guy who applied them to say "STOP DOING THAT" and jab the character with a pointy stick.
Organizations with bigger budgets will be able to afford better restraints, including:
Some sci-fi settings even have nanowire cuffs, which you have to wear very carefully; one sharp tug and your hands come off at the wrist. But that's probably a bit over the top for D&D.