Changeset 102225 in vbox
- Timestamp:
- Nov 22, 2023 8:54:21 AM (12 months ago)
- Location:
- trunk/src/libs/xpcom18a4
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/primpl.h
r102216 r102225 130 130 #define _PR_MD_FINAL_INIT _MD_FINAL_INIT 131 131 132 /* Current Time */133 NSPR_API(PRTime) _PR_MD_NOW(void);134 #define _PR_MD_NOW _MD_NOW135 136 132 /* Time intervals */ 137 133 -
trunk/src/libs/xpcom18a4/nsprpub/pr/include/prtime.h
r102223 r102225 51 51 #include "prlong.h" 52 52 53 #ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP54 #define PR_Now VBoxNsprPR_Now55 #endif /* VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */56 57 53 PR_BEGIN_EXTERN_C 58 54 … … 63 59 #define PR_MSEC_PER_SEC 1000UL 64 60 #define PR_USEC_PER_SEC 1000000UL 65 #define PR_NSEC_PER_SEC 1000000000UL66 61 #define PR_USEC_PER_MSEC 1000UL 67 #define PR_NSEC_PER_MSEC 1000000UL68 62 69 63 /* … … 84 78 typedef PRInt64 PRTime; 85 79 86 /**********************************************************************/87 /****************************** FUNCTIONS *****************************/88 /**********************************************************************/89 90 /*91 * The PR_Now routine returns the current time relative to the92 * epoch, midnight, January 1, 1970 UTC. The units of the returned93 * value are microseconds since the epoch.94 *95 * The values returned are not guaranteed to advance in a linear fashion96 * due to the application of time correction protocols which synchronize97 * computer clocks to some external time source. Consequently it should98 * not be depended on for interval timing.99 *100 * The implementation is machine dependent.101 * Cf. time_t time(time_t *tp) in ANSI C.102 */103 #if defined(HAVE_WATCOM_BUG_2)104 PRTime __pascal __export __loadds105 #else106 NSPR_API(PRTime)107 #endif108 PR_Now(void);109 110 80 PR_END_EXTERN_C 111 81 -
trunk/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/unix.c
r102198 r102225 60 60 rv = sigaction(SIGPIPE, &sigact, 0); 61 61 Assert(0 == rv); 62 }63 64 /*65 *-----------------------------------------------------------------------66 *67 * PR_Now --68 *69 * Returns the current time in microseconds since the epoch.70 * The epoch is midnight January 1, 1970 GMT.71 * The implementation is machine dependent. This is the Unix72 * implementation.73 * Cf. time_t time(time_t *tp)74 *75 *-----------------------------------------------------------------------76 */77 78 PR_IMPLEMENT(PRTime)79 PR_Now(void)80 {81 struct timeval tv;82 PRInt64 s, us, s2us;83 84 GETTIMEOFDAY(&tv);85 LL_I2L(s2us, PR_USEC_PER_SEC);86 LL_I2L(s, tv.tv_sec);87 LL_I2L(us, tv.tv_usec);88 LL_MUL(s, s, s2us);89 LL_ADD(s, s, us);90 return s;91 62 } 92 63 -
trunk/src/libs/xpcom18a4/xpcom/build/nsXPComInit.cpp
r102122 r102225 37 37 38 38 #include <iprt/initterm.h> 39 #include <iprt/time.h> 39 40 40 41 #include "nsXPCOM.h" … … 690 691 NS_GET_IID(nsIFile), 691 692 getter_AddRefs(compregFile)); 692 compregFile->SetLastModifiedTime(PR_Now() / 1000); 693 RTTIMESPEC Time; 694 RTTimeNow(&Time); 695 compregFile->SetLastModifiedTime(RTTimeSpecGetMilli(&Time)); 693 696 } 694 697
Note:
See TracChangeset
for help on using the changeset viewer.