As a concrete analogy, which isn't precisely on point, but should be similar in order of magnitude of its duration, the merger of two intermediate sized black holes detected by gravitational wave detectors
on May 21, 2019 at a distance of 5 parsecs away form Earth (about 16.3 light years and hence from an event that actually took place about 16.3 years before it was detected) took about 0.1 seconds. This is consistent with the post from @russ_waters quoted above.
NASA asserts that "A stellar-mass black hole, with a mass of tens of times the mass of the Sun, can likely form in seconds, after the collapse of a massive star."
And,
it is inevitable that a black hole will once the conditions for the formation of a black hole are met:
Citation #6 in the quotation above is to Penrose, Roger (1965-01-18). "Gravitational Collapse and Space–Time Singularities".
Physical Review Letters. American Physical Society (APS).
14 (3): 57–59.
Bibcode:
1965PhRvL..14...57P.
doi:
10.1103/physrevlett.14.57.
ISSN 0031-9007.
Describing the length of time for this requires a rigorous definition to provide a rigorous answer, however.
Of course, the times being discussed in this thread are the times from the star reaches the "tipping point" until the process of black hole formation being completed, i.e. from the "straw that broke the camel's back moment". It can, of course, take millions or billions of years for a star to reach that tipping point.
Also, when one is talking about the duration of this process, this sloppy question and correspondingly sloppy answer, is implicitly talking about the duration of the event from the perspective of an observer so distant that gravitational time dilation from the forming black hole itself is negligible (e.g. an observer on distant Earth watching in a telescope as the star disappears).
Gravitational time dilation in the immediately proximity of the event greatly slows down the passage of time in a highly observer location specific way due to General Relativity, so it isn't rigorously correct to state that this process happens in any specific duration of time, without specifying the location of the observer whose rate of time passage you care about.
Being punctiliously careful about precisely which observer's passage of time is relevant to the physics calculations you are doing is a critically important conceptual task in any situation that involves very strong gravitational fields. Every now and then you see debates between scientists over papers one of them has written, in published criticisms of the other person's papers, asserting that the wrong observer's time has been used in calculations, causing the original calculations to be fatally flawed.