Ported refinable.h and put some timers when locking during resize