implement UtilTime class
add test case for UtilThread intervals
fix to wait with pthread_cond_timedwait()