Fixes to get it working in windows

Changed timer resolution
Fixes to get prototype running
bug: the event_callback crashes if free(event) occurs