Calculate a timeout to use based on queue size

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>