Added high precision timer
Fixed MSVC warnings