No way to tell you how long as this is a brain issue and everyone is different. Your therapists/neurologists could consider using some botox with the casting and rehab as that is what it was originally used for. Well that is if the contracture is related to spasticity. If it is just a shortening due to non-use then casting will only work as long as the exercise is able to move the limb through the new range of motion that was created. Also the fact you mention they needed to put the cast back on for you to walk but that you couldn't bend it with the cast off seems to me that fear is more the factor there and possible weakness in the quads. The only was to get over that is get off the cast and rehab, hence the split cast is a great idea.

Do let us know how you get on :-)