Changeset 3123 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Jun 15, 2007 2:46:16 PM (18 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/Makefile.kmk
r3054 r3123 834 834 RuntimeGC_DEFS = IN_RT_GC RT_WITH_VBOX 835 835 RuntimeGC_SOURCES = \ 836 gc/initterm-gc.cpp \ 836 837 misc/sanity-cpp.cpp \ 837 838 misc/sanity-c.c \ … … 856 857 VBox/strformat-vbox.cpp \ 857 858 timesup.cpp \ 859 timeprog.cpp \ 858 860 string/memchr.cpp \ 859 861 string/memcmp.cpp \ -
trunk/src/VBox/Runtime/include/internal/time.h
r2981 r3123 27 27 __BEGIN_DECLS 28 28 29 #if def IN_RING329 #if defined(IN_RING3) || defined(IN_GC) 30 30 31 31 extern uint64_t g_u64ProgramStartNanoTS; 32 extern uint64_t g_u64ProgramStartMicroTS; 32 33 extern uint64_t g_u64ProgramStartMilliTS; 33 34 -
trunk/src/VBox/Runtime/log.cpp
r3086 r3123 1928 1928 if (pLogger->fFlags & RTLOGFLAGS_PREFIX_MS_PROG) 1929 1929 { 1930 #if def IN_RING31930 #if defined(IN_RING3) || defined(IN_GC) 1931 1931 uint64_t u64 = RTTimeProgramMilliTS(); 1932 1932 #else -
trunk/src/VBox/Runtime/r3/init.cpp
r2981 r3123 66 66 */ 67 67 uint64_t g_u64ProgramStartNanoTS; 68 69 /** 70 * Program start microsecond TS. 71 */ 72 uint64_t g_u64ProgramStartMicroTS; 68 73 69 74 /** … … 146 151 */ 147 152 g_u64ProgramStartNanoTS = RTTimeNanoTS(); 148 g_u64ProgramStartMilliTS = RTTimeMilliTS(); 153 g_u64ProgramStartMicroTS = g_u64ProgramStartNanoTS / 1000; 154 g_u64ProgramStartMilliTS = g_u64ProgramStartNanoTS / 1000000; 149 155 150 156 #ifndef IN_GUEST -
trunk/src/VBox/Runtime/timeprog.cpp
r2981 r3123 35 35 * @returns Timestamp relative to program startup. 36 36 */ 37 RT R3DECL(uint64_t) RTTimeProgramNanoTS(void)37 RTDECL(uint64_t) RTTimeProgramNanoTS(void) 38 38 { 39 AssertMsg(g_u64ProgramStartNanoTS, ("RTR3Init hasn't been called!\n"));40 39 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 */ 48 RTDECL(uint64_t) RTTimeProgramMicroTS(void) 49 { 50 return RTTimeProgramNanoTS() / 1000; 41 51 } 42 52 … … 47 57 * @returns Timestamp relative to program startup. 48 58 */ 49 RT R3DECL(uint64_t) RTTimeProgramMilliTS(void)59 RTDECL(uint64_t) RTTimeProgramMilliTS(void) 50 60 { 51 /* AssertMsg(g_u64ProgramStartMilliTS, ("RTR3Init hasn't been called!\n")); */52 61 return RTTimeMilliTS() - g_u64ProgramStartMilliTS; 53 62 } … … 59 68 * @returns Timestamp relative to program startup. 60 69 */ 61 RT R3DECL(uint32_t) RTTimeProgramSecTS(void)70 RTDECL(uint32_t) RTTimeProgramSecTS(void) 62 71 { 63 72 AssertMsg(g_u64ProgramStartMilliTS, ("RTR3Init hasn't been called!\n")); 64 73 return (uint32_t)(RTTimeProgramMilliTS() / 1000); 65 74 } 75 76 77 /** 78 * Get the RTTimeNanoTS() of when the program started. 79 * 80 * @returns Program startup timestamp. 81 */ 82 RTDECL(uint64_t) RTTimeProgramStartNanoTS(void) 83 { 84 return g_u64ProgramStartNanoTS; 85 }
Note:
See TracChangeset
for help on using the changeset viewer.