VirtualBox

Ignore:
Timestamp:
Sep 23, 2014 10:25:34 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
96224
Message:

Runtime: Fix RTTimeMilliTS() on FreeBSD. Use macros for time units rather than hardcoded values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/darwin/time-darwin.cpp

    r48935 r52822  
    55
    66/*
    7  * Copyright (C) 2006-2010 Oracle Corporation
     7 * Copyright (C) 2006-2014 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    8989    struct timeval tv;
    9090    gettimeofday(&tv, NULL);
    91     return (uint64_t)tv.tv_sec  * (uint64_t)(1000 * 1000 * 1000)
    92          + (uint64_t)(tv.tv_usec * 1000);
     91    return (uint64_t)tv.tv_sec  * RT_NS_1SEC_64
     92         + (uint64_t)(tv.tv_usec * RT_NS_1US);
    9393}
    9494
     
    102102RTDECL(uint64_t) RTTimeSystemMilliTS(void)
    103103{
    104     return rtTimeGetSystemNanoTS() / 1000000;
     104    return rtTimeGetSystemNanoTS() / RT_NS_1MS;
    105105}
    106106
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette