michael@0: /* michael@0: * Copyright © 2013 Sebastien Alaiwan michael@0: * michael@0: * This program is made available under an ISC-style license. See the michael@0: * accompanying file LICENSE for details. michael@0: */ michael@0: michael@0: #if defined( _WIN32) michael@0: #ifndef WIN32_LEAN_AND_MEAN michael@0: #define WIN32_LEAN_AND_MEAN michael@0: #endif michael@0: #include michael@0: #else michael@0: #include michael@0: #endif michael@0: michael@0: void delay(unsigned int ms) michael@0: { michael@0: #if defined(_WIN32) michael@0: Sleep(ms); michael@0: #else michael@0: sleep(ms / 1000); michael@0: usleep(ms % 1000 * 1000); michael@0: #endif michael@0: } michael@0: michael@0: #if !defined(M_PI) michael@0: #define M_PI 3.14159265358979323846 michael@0: #endif michael@0: