use the new (and old) select() and timeout() APIs