stream: calculate millseconds until timeout of poll().