VirtualBox

Changeset 9240 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 29, 2008 10:52:36 PM (17 years ago)
Author:
vboxsync
Message:

Use ktime_get_ts() instead of ktime_get() as the latter first appeared in 2.6.21 while the former was there in 2.6.16 already.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c

    r9239 r9240  
    4444#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
    4545    /*
    46      * Use ktime_get, this is also what clock_gettime(CLOCK_MONOTONIC,) is using.
     46     * Use ktime_get_ts, this is also what clock_gettime(CLOCK_MONOTONIC,) is using.
    4747     */
    48     ktime_t Kt = ktime_get();
    49     struct timespec Ts = ktime_to_timespec(Kt);
    50     uint64_t u64 = Ts.tv_sec * UINT64_C(1000000000)
    51                 + Ts.tv_nsec;
     48    uint64_t u64;
     49    struct timespec Ts;
     50    ktime_get_ts(&Ts);
     51    u64 = Ts.tv_sec * UINT64_C(1000000000) + Ts.tv_nsec;
    5252    return u64;
    5353
Note: See TracChangeset for help on using the changeset viewer.

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