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/r0drv/darwin/time-r0drv-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
     
    6868RTDECL(uint64_t) RTTimeMilliTS(void)
    6969{
    70     return rtTimeGetSystemNanoTS() / 1000000;
     70    return rtTimeGetSystemNanoTS() / RT_NS_1MS;
    7171}
    7272
     
    8080RTDECL(uint64_t) RTTimeSystemMilliTS(void)
    8181{
    82     return rtTimeGetSystemNanoTS() / 1000000;
     82    return rtTimeGetSystemNanoTS() / RT_NS_1MS;
    8383}
    8484
     
    9494#endif
    9595    clock_get_calendar_nanotime(&uSecs, &uNanosecs);
    96     return RTTimeSpecSetNano(pTime, (uint64_t)uSecs * 1000000000 + uNanosecs);
     96    return RTTimeSpecSetNano(pTime, (uint64_t)uSecs * RT_NS_1SEC + uNanosecs);
    9797}
    9898
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