gecko-dev/media/libcubeb/tests/common.h
Paul Adenot c554394dfb Bug 946618 - Update cubeb to pick up new tests. r=kinetik
--HG--
extra : rebase_source : 335880c5ecc3ace9cf5260e9e95b668ae00d183a
2014-02-27 16:26:24 +01:00

31 lines
489 B
C

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