VirtualBox

Changeset 102177 in vbox


Ignore:
Timestamp:
Nov 21, 2023 9:09:41 AM (17 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160302
Message:

libs/xpcom/xpcom: Convert the xptiAutoLog timestamp writing to IPRT (not used without special environment variables being set), bugref:10545

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/xpcom/reflect/xptinfo/src/xptiMisc.cpp

    r39926 r102177  
    3939
    4040/* Implementation of misc. xpti stuff. */
     41
     42#include <iprt/time.h>
    4143
    4244#include "xptiprivate.h"
     
    125127void xptiAutoLog::WriteTimestamp(PRFileDesc* fd, const char* msg)
    126128{
    127     PRExplodedTime expTime;
    128     PR_ExplodeTime(PR_Now(), PR_LocalTimeParameters, &expTime);
     129    RTTIMESPEC TimeSpec;
     130    RTTimeLocalNow(&TimeSpec);
     131
     132    RTTIME Time;
     133    RTTimeExplode(&Time, &TimeSpec);
     134    RTTimeNormalize(&Time);
    129135    char time[128];
    130     PR_FormatTimeUSEnglish(time, 128, "%Y-%m-%d-%H:%M:%S", &expTime);
     136    RTTimeToString(&Time, time, sizeof(time));
    131137    PR_fprintf(fd, "\n%s %s\n\n", msg, time);
    132138}
Note: See TracChangeset for help on using the changeset viewer.

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