time_t       gmtDiff;
JSInt32       gmtDiff;
PRMJ_Now(void){#ifdef XP_PC    JSInt64 s, us, ms2us, s2us;#ifndef __MWERKS__    struct timeb b;#else    SYSTEMTIME time;#endif /* __MWERKS__ */#endif /* XP_PC */#if defined(XP_UNIX) || defined(XP_BEOS)    struct timeval tv;    JSInt64 s, us, s2us;#endif /* XP_UNIX */#ifdef XP_MAC    JSUint64 upTime;    JSInt64	 localTime;    JSInt64       gmtOffset;    JSInt64    dstOffset;    time_t       gmtDiff;    JSInt64	 s2us;#endif /* XP_MAC */#ifdef XP_PC#ifndef __MWERKS__    ftime(&b);    JSLL_UI2L(ms2us, PRMJ_USEC_PER_MSEC);    JSLL_UI2L(s2us, PRMJ_USEC_PER_SEC);    JSLL_UI2L(s, b.time);    JSLL_UI2L(us, b.millitm);    JSLL_MUL(us, us, ms2us);    JSLL_MUL(s, s, s2us);    JSLL_ADD(s, s, us);    return s;#else    GetLocalTime(&time);    JSLL_UI2L(ms2us, PRMJ_USEC_PER_MSEC);    JSLL_UI2L(s2us, PRMJ_USEC_PER_SEC);    JSLL_UI2L(s, time.wSecond);    JSLL_UI2L(us, time.wMilliseconds);    JSLL_MUL(us, us, ms2us);    JSLL_MUL(s, s, s2us);    JSLL_ADD(s, s, us);    return s;#endif /* __MWERKS__ */#endif#if defined(XP_UNIX) || defined(XP_BEOS)#ifdef _SVID_GETTOD   /* Defined only on Solaris, see Solaris <sys/types.h> */    gettimeofday(&tv);#else    gettimeofday(&tv, 0);#endif /* _SVID_GETTOD */    JSLL_UI2L(s2us, PRMJ_USEC_PER_SEC);    JSLL_UI2L(s, tv.tv_sec);    JSLL_UI2L(us, tv.tv_usec);    JSLL_MUL(s, s, s2us);    JSLL_ADD(s, s, us);    return s;#endif /* XP_UNIX */#ifdef XP_MAC    JSLL_UI2L(localTime,0);    gmtDiff = PRMJ_LocalGMTDifference();    JSLL_I2L(gmtOffset,gmtDiff);    JSLL_UI2L(s2us, PRMJ_USEC_PER_SEC);    JSLL_MUL(gmtOffset,gmtOffset,s2us);    JSLL_UI2L(dstOffset,0);    dstOffset = PRMJ_DSTOffset(dstOffset);    JSLL_SUB(gmtOffset,gmtOffset,dstOffset);    /* don't adjust for DST since it sets ctime and gmtime off on the MAC */    Microseconds((UnsignedWide*)&upTime);    JSLL_ADD(localTime,localTime,gmtOffset);    JSLL_ADD(localTime,localTime, dstLocalBaseMicroseconds);    JSLL_ADD(localTime,localTime, upTime);    return *((JSUint64 *)&localTime);#endif /* XP_MAC */}