提交 60759371 编写于 作者: A aurel32

FreeBSD also has clock_gettime

Signed-off-by: NJuergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5481 c046a42c-6fe2-441c-8c8c-71466251a162
上级 6556a833
......@@ -733,7 +733,7 @@ static int use_rt_clock;
static void init_get_clock(void)
{
use_rt_clock = 0;
#if defined(__linux__)
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
{
struct timespec ts;
if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) {
......@@ -745,7 +745,7 @@ static void init_get_clock(void)
static int64_t get_clock(void)
{
#if defined(__linux__)
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
if (use_rt_clock) {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册