Time calculation using high resolution timer libray in linux