make clock_monotonic work; do not use default timeout; from Scott Lamb, plus some fixes from me. svn:r371