Added function to sleep until GC has calmed.