When you say "more than a few days", it makes me wonder what age you are getting the silkworms at.
From hatching to spinning a cocoon takes about 6 weeks on average.
You can delay them from spinning (i.e. prolong the larval stage) by feeding them less. One method I've used is not to give them food at night. The only problem I have with this approach is that generally the worms seem less healthy, and I have a slightly higher amount of deaths over the life cycle.
(that said, I only had about 15 deaths out of my last batch of 850 worms).
Still, I want my cham to be eating the healthiest worms possible, so I prefer to give them enough food to get them big, healthy and juicy, rather than keeping them scrawny just to prolong their usefulness.
If you're hatching your worms from eggs, a better method would be to hatch only a few eggs every week/fortnight (and leave the rest in the fridge until you need them). That way you will have staggered batches of worms, and you should always have a batch that is the right size for your cham.