In general this class could use much more clear variable names. They are all very similar and make it difficult to track what's going on. usRest,usLast,m_usSyncTime,m_usWait, etc. are all basically opaque names.