Added unistd.h include for usleep