transplant some general purpose classes from timeout to askandroidlib