Removed sys/time include
Added define for cmath