Added compiler flag -std=gnu99 to makefile and #include <sys/time.h>