Add a missing closing paren.
Use usleep() for msleep() if it is available.