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/linux/time-r0drv-linux.c

    r44528 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
     
    4646    struct timespec Ts;
    4747    ktime_get_ts(&Ts);
    48     u64 = Ts.tv_sec * UINT64_C(1000000000) + Ts.tv_nsec;
     48    u64 = Ts.tv_sec * RT_NS_1SEC_64 + Ts.tv_nsec;
    4949    return u64;
    5050
     
    149149RTDECL(uint64_t) RTTimeMilliTS(void)
    150150{
    151     return rtTimeGetSystemNanoTS() / 1000000;
     151    return rtTimeGetSystemNanoTS() / RT_NS_1MS;
    152152}
    153153RT_EXPORT_SYMBOL(RTTimeMilliTS);
     
    163163RTDECL(uint64_t) RTTimeSystemMilliTS(void)
    164164{
    165     return rtTimeGetSystemNanoTS() / 1000000;
     165    return rtTimeGetSystemNanoTS() / RT_NS_1MS;
    166166}
    167167RT_EXPORT_SYMBOL(RTTimeSystemMilliTS);
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