remove unnecessary things

using gettimeofday instead, move other c and c++ things