Actually it is more of abiding by strict ritual. They will stay as along as it takes for them to elect a new Pontiff.
I think I heard FOX News say something like 2 weeks, or 15 days or thereabouts?
I believe the conclave begins in 10 days - following the official 9 days of mourning.
I could be wrong - consideirng it was 26 years since it has been done, so I may not be quite as up on the strictures as I once was.