OSErr FlushCatalog(ExtendedVCB *volume) { FCB * fcb; OSErr result; fcb = GetFileControlBlock(volume->catalogRefNum); result = BTFlushPath(fcb); if (result == noErr) { //--- check if catalog's fcb is dirty... if ( 0 /*fcb->fcbFlags & fcbModifiedMask*/ ) { HFS_MOUNT_LOCK(volume, TRUE); MarkVCBDirty(volume); // Mark the VCB dirty volume->vcbLsMod = GetTimeUTC(); // update last modified date HFS_MOUNT_UNLOCK(volume, TRUE); // result = FlushVolumeControlBlock(volume); } } return result; }
void MTime::GetLocalTime(MCONTACT hContact) { TIME_ZONE_INFORMATION tzi; GetTimeUTC(); if (!GetContactTimeZoneInformation(hContact, (LPARAM)&tzi)) { UTCToTzSpecificLocal(&tzi); } }
PosixTimeInfo::PosixTimeInfo() : m_resolution(ComputeResolution()) # ifdef MONOTONIC_TIMER , m_started(RunTimeMSNow() - 1000) # else , m_quantum(POSIX_CREDIBLE_TIME_QUANTUM) // may be a non-trivial expression ... , m_last_ms(GetTimeUTC()) // can't call RunTimeMSNow until this has been initialized ! , m_started(m_last_ms - 1000) // nominal start time 1s earlier # endif // MONOTONIC_TIMER , m_last_tick(0) { #ifdef POSIX_CREDIBLE_TIME_QUANTUM // Assumed in RunTimeMSNow(): OP_ASSERT(POSIX_CREDIBLE_TIME_QUANTUM > 0); #endif // POSIX_CREDIBLE_TIME_QUANTUM }
uint64_t GetTimeUs() { uint64_t t = GetTimeUTC( ); return t; }