Port gettimeofday and get home dire