Fixed variable in windows specific code
Added timer functions for windows & linux