linux related updates for distance.Rdb timings and getting the code to work on linux