fix select timeout, add some macro
Merge pull request #9 from yifan-gu/master

fix select timeout, add some macro