Added flask context aware delay method.