Fix timer for windows and add sleep sample