The length of time is variable .... just as the type of sewing we all do is variable.
Types of fabrics, FMQing (seldom? often? type?), batting, hitting a pin, paper piecing, breakage, dull .....
Get to know your machine and the difference in how it stitches and sounds before and after a needle change. If you do, you will soon know that it's time to change the needle!