Why is it 4分で売り切りだった and not 4分に売り切りだった？

Could someone help explain why で is used and not に?
CC BY-SA 4.0
2022-06-18T14:07:31.807
94997
2022-06-18T17:13:36.827
2022-06-18T17:13:36.827
30454
51638
question
particles
Why is it 4分で売り切りだった and not 4分に売り切りだった？
で means a range of time while に does not.
CC BY-SA 4.0
2022-06-18T15:02:25.920
94998
2022-06-18T15:02:25.920
51639
94997
answer