Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

static KU64 kPrfNow ( void   )  [inline, static]

Get the now timestamp. This must correspond to what the assembly code are doing.

Definition at line 326 of file kProfileR3.cpp.

{
#if defined(HAVE_INTRIN)
    return __rdtsc();
# else
    union
    {
        KU64 u64;
        struct
        {
            KU32 u32Lo;
            KU32 u32Hi;
        } s;
    } u;
# if defined(__GNUC__)
    __asm__ __volatile__ ("rdtsc\n\t" : "=a" (u.s.u32Lo), "=d" (u.s.u32Hi));
# else
    __asm
    {
        rdtsc
        mov     [u.s.u32Lo], eax
        mov     [u.s.u32Hi], edx
    }

# endif
    return u.u64;
#endif
}


Generated by  Doxygen 1.6.0   Back to index