VirtualBox

Changeset 3123 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Jun 15, 2007 2:46:16 PM (18 years ago)
Author:
vboxsync
Message:

Made VBOX_LOG_FLAGS=msprog work in GC.

Location:
trunk/src/VBox/Runtime
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/Makefile.kmk

    r3054 r3123  
    834834RuntimeGC_DEFS          = IN_RT_GC RT_WITH_VBOX
    835835RuntimeGC_SOURCES       = \
     836        gc/initterm-gc.cpp \
    836837        misc/sanity-cpp.cpp \
    837838        misc/sanity-c.c \
     
    856857        VBox/strformat-vbox.cpp \
    857858        timesup.cpp \
     859        timeprog.cpp \
    858860        string/memchr.cpp \
    859861        string/memcmp.cpp \
  • trunk/src/VBox/Runtime/include/internal/time.h

    r2981 r3123  
    2727__BEGIN_DECLS
    2828
    29 #ifdef IN_RING3
     29#if defined(IN_RING3) || defined(IN_GC)
    3030
    3131extern uint64_t g_u64ProgramStartNanoTS;
     32extern uint64_t g_u64ProgramStartMicroTS;
    3233extern uint64_t g_u64ProgramStartMilliTS;
    3334
  • trunk/src/VBox/Runtime/log.cpp

    r3086 r3123  
    19281928                if (pLogger->fFlags & RTLOGFLAGS_PREFIX_MS_PROG)
    19291929                {
    1930 #ifdef IN_RING3
     1930#if defined(IN_RING3) || defined(IN_GC)
    19311931                    uint64_t u64 = RTTimeProgramMilliTS();
    19321932#else
  • trunk/src/VBox/Runtime/r3/init.cpp

    r2981 r3123  
    6666 */
    6767uint64_t    g_u64ProgramStartNanoTS;
     68
     69/**
     70 * Program start microsecond TS.
     71 */
     72uint64_t    g_u64ProgramStartMicroTS;
    6873
    6974/**
     
    146151     */
    147152    g_u64ProgramStartNanoTS = RTTimeNanoTS();
    148     g_u64ProgramStartMilliTS = RTTimeMilliTS();
     153    g_u64ProgramStartMicroTS = g_u64ProgramStartNanoTS / 1000;
     154    g_u64ProgramStartMilliTS = g_u64ProgramStartNanoTS / 1000000;
    149155
    150156#ifndef IN_GUEST
  • trunk/src/VBox/Runtime/timeprog.cpp

    r2981 r3123  
    3535 * @returns Timestamp relative to program startup.
    3636 */
    37 RTR3DECL(uint64_t)  RTTimeProgramNanoTS(void)
     37RTDECL(uint64_t)  RTTimeProgramNanoTS(void)
    3838{
    39     AssertMsg(g_u64ProgramStartNanoTS, ("RTR3Init hasn't been called!\n"));
    4039    return RTTimeNanoTS() - g_u64ProgramStartNanoTS;
     40}
     41
     42
     43/**
     44 * Get the microsecond timestamp relative to program startup.
     45 *
     46 * @returns Timestamp relative to program startup.
     47 */
     48RTDECL(uint64_t)  RTTimeProgramMicroTS(void)
     49{
     50    return RTTimeProgramNanoTS() / 1000;
    4151}
    4252
     
    4757 * @returns Timestamp relative to program startup.
    4858 */
    49 RTR3DECL(uint64_t)  RTTimeProgramMilliTS(void)
     59RTDECL(uint64_t)  RTTimeProgramMilliTS(void)
    5060{
    51 /*    AssertMsg(g_u64ProgramStartMilliTS, ("RTR3Init hasn't been called!\n")); */
    5261    return RTTimeMilliTS() - g_u64ProgramStartMilliTS;
    5362}
     
    5968 * @returns Timestamp relative to program startup.
    6069 */
    61 RTR3DECL(uint32_t)  RTTimeProgramSecTS(void)
     70RTDECL(uint32_t)  RTTimeProgramSecTS(void)
    6271{
    6372    AssertMsg(g_u64ProgramStartMilliTS, ("RTR3Init hasn't been called!\n"));
    6473    return (uint32_t)(RTTimeProgramMilliTS() / 1000);
    6574}
     75
     76
     77/**
     78 * Get the RTTimeNanoTS() of when the program started.
     79 *
     80 * @returns Program startup timestamp.
     81 */
     82RTDECL(uint64_t) RTTimeProgramStartNanoTS(void)
     83{
     84    return g_u64ProgramStartNanoTS;
     85}
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