/foundation/ai/ai_engine/services/common/platform/time/source/ |
D | time_elapser.cpp | 29 startTime_ = std::chrono::system_clock::now(); in Reset() 39 std::chrono::system_clock::time_point now = std::chrono::system_clock::now(); in ElapseMicro() local 40 return std::chrono::duration_cast<std::chrono::microseconds>(now - startTime_).count(); in ElapseMicro() 45 std::chrono::system_clock::time_point now = std::chrono::system_clock::now(); in ElapseMilli() local 46 return std::chrono::duration_cast<std::chrono::milliseconds>(now - startTime_).count(); in ElapseMilli() 51 std::chrono::system_clock::time_point now = std::chrono::system_clock::now(); in ElapseSec() local 52 return std::chrono::duration_cast<std::chrono::seconds>(now - startTime_).count(); in ElapseSec()
|
/foundation/multimedia/histreamer/engine/foundation/utils/ |
D | steady_clock.cpp | 29 return duration_cast<milliseconds>(high_resolution_clock::now().time_since_epoch()).count(); in GetCurrentTimeMs() 34 return duration_cast<nanoseconds>(high_resolution_clock::now().time_since_epoch()).count(); in GetCurrentTimeNanoSec() 36 SteadyClock::SteadyClock() : begin_(high_resolution_clock::now()) in SteadyClock() 44 begin_ = high_resolution_clock::now(); in Reset() 49 return duration_cast<milliseconds>(high_resolution_clock::now() - begin_).count(); in ElapsedMilliseconds() 54 return duration_cast<microseconds>(high_resolution_clock::now() - begin_).count(); in ElapsedMicroseconds() 59 return duration_cast<nanoseconds>(high_resolution_clock::now() - begin_).count(); in ElapsedNanoseconds() 64 return duration_cast<seconds>(high_resolution_clock::now() - begin_).count(); in ElapsedSeconds()
|
/foundation/communication/netstack/frameworks/js/napi/http/cache/cache_strategy/src/ |
D | http_time.cpp | 41 auto now = std::chrono::system_clock::now(); in GetNowTimeSeconds() local 42 return std::chrono::duration_cast<std::chrono::seconds>(now.time_since_epoch()).count(); in GetNowTimeSeconds() 47 auto now = std::chrono::system_clock::now(); in GetNowTimeGMT() local 48 …time_t timeSeconds = std::chrono::duration_cast<std::chrono::seconds>(now.time_since_epoch()).coun… in GetNowTimeGMT()
|
/foundation/communication/netstack/frameworks/native/http/http_client/ |
D | http_client_time.cpp | 31 auto now = std::chrono::system_clock::now(); in GetNowTimeGMT() local 32 …time_t timeSeconds = std::chrono::duration_cast<std::chrono::seconds>(now.time_since_epoch()).coun… in GetNowTimeGMT() 50 auto now = std::chrono::system_clock::now(); in GetNowTimeGMT() local 51 return std::chrono::duration_cast<std::chrono::seconds>(now.time_since_epoch()).count(); in GetNowTimeGMT()
|
/foundation/ability/ability_runtime/frameworks/native/appkit/app/ |
D | watchdog.cpp | 145 int64_t now = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono:: in Timer() local 146 system_clock::now().time_since_epoch()).count(); in Timer() 147 if ((now - lastWatchTime_) >= (CHECK_INTERVAL_TIME / RESET_RATIO)) { in Timer() 148 lastWatchTime_ = now; in Timer() 154 int64_t now = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono:: in ReportEvent() local 155 system_clock::now().time_since_epoch()).count(); in ReportEvent() 156 if ((now - lastWatchTime_) > (RESET_RATIO * CHECK_INTERVAL_TIME) || in ReportEvent() 157 (now - lastWatchTime_) < (CHECK_INTERVAL_TIME / RESET_RATIO)) { in ReportEvent() 159 static_cast<unsigned long long>(now), static_cast<unsigned long long>(lastWatchTime_)); in ReportEvent()
|
/foundation/graphic/graphic_2d/rosen/modules/composer/vsync/src/ |
D | vsync_generator.cpp | 28 auto now = std::chrono::steady_clock::now().time_since_epoch(); in GetSysTimeNs() local 29 return std::chrono::duration_cast<std::chrono::nanoseconds>(now).count(); in GetSysTimeNs() 148 int64_t VSyncGenerator::ComputeNextVSyncTimeStamp(int64_t now, int64_t refrenceTime) in ComputeNextVSyncTimeStamp() argument 152 int64_t t = ComputeListenerNextVSyncTimeStamp(listeners_[i], now, refrenceTime); in ComputeNextVSyncTimeStamp() 161 int64_t VSyncGenerator::ComputeListenerNextVSyncTimeStamp(const Listener& listener, int64_t now, in… in ComputeListenerNextVSyncTimeStamp() argument 164 if (now < lastVSyncTime) { in ComputeListenerNextVSyncTimeStamp() 165 now = lastVSyncTime; in ComputeListenerNextVSyncTimeStamp() 168 now -= refrenceTime; in ComputeListenerNextVSyncTimeStamp() 170 now -= phase; in ComputeListenerNextVSyncTimeStamp() 171 if (now < 0) { in ComputeListenerNextVSyncTimeStamp() [all …]
|
/foundation/graphic/graphic_2d/rosen/modules/texgine/src/utils/ |
D | exlog.cpp | 29 auto now = localtime(&timer); in ExTime() local 30 if (now == nullptr) { in ExTime() 34 … std::chrono::system_clock::now().time_since_epoch()).count() + (8 * 1000LL * 60 * 60); in ExTime() 35 int year = static_cast<int>(now->tm_year) + 1900; in ExTime() 36 int month = now->tm_mon + 1; in ExTime() 37 int day = now->tm_mday; in ExTime()
|
/foundation/systemabilitymgr/samgr_lite/samgr_endpoint/source/ |
D | token_bucket.c | 24 uint64 now = SAMGR_GetProcessTime(); in TB_CheckMessage() local 25 uint64 generated = (now > bucket->last) ? ((now - bucket->last) * bucket->rate) : 0; in TB_CheckMessage() 32 bucket->last = now; in TB_CheckMessage()
|
/foundation/resourceschedule/ffrt/src/sync/ |
D | delayed_worker.cpp | 61 time_point_t now = std::chrono::steady_clock::now(); in HandleWork() local 63 if (cur->first <= now) { in HandleWork() 94 time_point_t now = std::chrono::steady_clock::now(); in dispatch() local 95 if (to <= now) { in dispatch()
|
/foundation/arkui/ace_engine/frameworks/base/utils/ |
D | date_util.cpp | 28 auto now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); in Current() local 29 auto local = std::localtime(&now); in Current() 84 auto now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); in GetMilliSecondsByDateTime() local 85 auto local = std::localtime(&now); in GetMilliSecondsByDateTime()
|
/foundation/systemabilitymgr/samgr_lite/samgr/source/ |
D | task_manager.h | 35 #define GET_INTERVAL(last, now) (((last) > (now)) ? (GET_REMAIN_TIME(last) + (now)) : ((now) - (las… argument
|
/foundation/resourceschedule/ffrt/benchmarks/ |
D | common.h | 29 #define CLOCK std::chrono::steady_clock::now() 58 auto start = std::chrono::steady_clock::now(); in simulate_task_compute_time() 62 …std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - start).co… in simulate_task_compute_time() 101 auto start = std::chrono::steady_clock::now(); in completely_paralle() 106 …time = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - st… in completely_paralle() 113 auto start = std::chrono::steady_clock::now(); in completely_serial() 118 …time = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - st… in completely_serial() 123 auto start = std::chrono::steady_clock::now(); in single_thread() 127 …time = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - st… in single_thread()
|
/foundation/multimedia/av_codec/test/unittest/hcodec_test/helper/ |
D | tester_codecbase.cpp | 52 auto begin = std::chrono::steady_clock::now(); in Create() 65 auto begin = std::chrono::steady_clock::now(); in SetCallback() 77 auto begin = std::chrono::steady_clock::now(); in Start() 89 auto begin = std::chrono::steady_clock::now(); in Stop() 101 auto begin = std::chrono::steady_clock::now(); in Release() 113 auto begin = std::chrono::steady_clock::now(); in Flush() 154 auto begin = std::chrono::steady_clock::now(); in ConfigureEncoder() 166 auto begin = std::chrono::steady_clock::now(); in CreateInputSurface() 178 auto begin = std::chrono::steady_clock::now(); in NotifyEos() 190 auto begin = std::chrono::steady_clock::now(); in RequestIDR() [all …]
|
D | tester_capi.cpp | 62 auto begin = std::chrono::steady_clock::now(); in Create() 81 auto begin = std::chrono::steady_clock::now(); in SetCallback() 95 auto begin = std::chrono::steady_clock::now(); in Start() 109 auto begin = std::chrono::steady_clock::now(); in Stop() 123 auto begin = std::chrono::steady_clock::now(); in Release() 137 auto begin = std::chrono::steady_clock::now(); in Flush() 180 auto begin = std::chrono::steady_clock::now(); in ConfigureEncoder() 193 auto begin = std::chrono::steady_clock::now(); in CreateInputSurface() 212 auto begin = std::chrono::steady_clock::now(); in NotifyEos() 228 auto begin = std::chrono::steady_clock::now(); in RequestIDR() [all …]
|
/foundation/arkui/ace_engine/frameworks/base/log/ |
D | jank_frame_report.cpp | 44 return duration_cast<T>(system_clock::now().time_since_epoch()).count(); in GetSystemTimestamp() 50 return duration_cast<T>(steady_clock::now().time_since_epoch()).count(); in GetSteadyTimestamp() 84 begin = steady_clock::now(); in Begin() 88 auto end = steady_clock::now(); in End() 115 int64_t now = GetSteadyTimestamp<std::chrono::nanoseconds>(); in JankFrameRecord() local 116 int64_t duration = now - std::max(timeStampNanos, prevEndTimeStamp_); in JankFrameRecord() 127 int64_t now = GetSteadyTimestamp<std::chrono::nanoseconds>(); in JsAnimationToRsRecord() local 129 int64_t jsAnimationDuration = now - animatorEndTime_; in JsAnimationToRsRecord()
|
/foundation/communication/dsoftbus/core/transmission/common/src/ |
D | trans_pending_pkt.c | 71 SoftBusSysTime now; in TimeBefore() local 72 SoftBusGetTime(&now); in TimeBefore() 73 return (now.sec < inputTime->sec || (now.sec == inputTime->sec && now.usec < inputTime->usec)); in TimeBefore() 134 SoftBusSysTime now; in ProcPendingPacket() local 135 SoftBusGetTime(&now); in ProcPendingPacket() 136 outtime.sec = now.sec + TIME_OUT; in ProcPendingPacket() 137 outtime.usec = now.usec; in ProcPendingPacket()
|
/foundation/graphic/graphic_2d/rosen/modules/platform/eventhandler_impl/ |
D | event_handler.cpp | 82 InnerEvent::TimePoint now = InnerEvent::Clock::now(); in SendEvent() local 83 event->SetSendTime(now); in SendEvent() 86 event->SetHandleTime(now + std::chrono::milliseconds(delayTime)); in SendEvent() 88 event->SetHandleTime(now); in SendEvent() 99 InnerEvent::TimePoint nowSys = InnerEvent::Clock::now(); in SendTimingEvent() 285 InnerEvent::TimePoint nowEnd = InnerEvent::Clock::now(); in DistributeTimeAction() 311 InnerEvent::TimePoint nowStart = InnerEvent::Clock::now(); in DistributeEvent() 327 auto now = std::chrono::system_clock::now(); in Dump() local 328 auto tp = std::chrono::time_point_cast<std::chrono::milliseconds>(now); in Dump() 329 auto tt = std::chrono::system_clock::to_time_t(now); in Dump()
|
D | event_handler_utils.h | 49 InnerEvent::TimePoint now = InnerEvent::Clock::now(); in TimePointToTimeOut() local 50 if (when <= now) { in TimePointToTimeOut() 54 auto duration = when - now; in TimePointToTimeOut()
|
/foundation/communication/dsoftbus/sdk/transmission/trans_channel/proxy/src/ |
D | client_trans_pending.c | 140 SoftBusSysTime now; in ComputeWaitPendTime() local 141 (void)SoftBusGetTime(&now); in ComputeWaitPendTime() 142 int64_t time = now.sec * USECTONSEC * USECTONSEC + now.usec + waitMillis * USECTONSEC; in ComputeWaitPendTime() 163 SoftBusSysTime now; in TransPendWaitTime() local 164 ComputeWaitPendTime(0, &now); in TransPendWaitTime() 165 if (now.sec > outtime.sec || (now.sec == outtime.sec && now.usec >= outtime.usec)) { in TransPendWaitTime()
|
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter/communicator/src/ |
D | softbus_client.cpp | 245 Time now = std::chrono::steady_clock::now(); in CloseP2pSessions() local 247 p2pFinishTime_.EraseIf([&now, &nextClose](const int32_t &connId, Time &finishTime) -> bool { in CloseP2pSessions() 248 if (finishTime + P2P_CLOSE_DELAY <= now) { in CloseP2pSessions() 262 closeP2pTaskId_ = Context::getInstance().GetThreadPool()->Schedule(nextClose - now, in CloseP2pSessions() 271 Time now = std::chrono::steady_clock::now(); in UpdateP2pFinishTime() local 273 p2pFinishTime_.Compute(connId, [&now, &delay](const auto &id, auto &finishTime) -> bool { in UpdateP2pFinishTime() 274 if (finishTime < now) { in UpdateP2pFinishTime() 275 finishTime = now + delay; in UpdateP2pFinishTime()
|
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/storage/ |
D | distributeddb_storage_subscribe_query_test.cpp | 384 Timestamp now = store->GetCurrentTimestamp(); variable 385 LOGD("now time is : %ld", now); 388 … DataItem item{key, value, now, DataItem::REMOTE_DEVICE_DATA_MISS_QUERY, REMOTE_DEVICE_ID, now}; 434 Timestamp now = store->GetCurrentTimestamp(); variable 442 DataItem item{key, value, now, DataItem::LOCAL_FLAG, REMOTE_DEVICE_ID, now}; 452 …DataItem itemMiss{key, value, now - 1, DataItem::REMOTE_DEVICE_DATA_MISS_QUERY, REMOTE_DEVICE_ID, … 492 Timestamp now = store->GetCurrentTimestamp(); variable 500 DataItem item{key, value, now, DataItem::LOCAL_FLAG, REMOTE_DEVICE_ID, now}; 509 DataItem itemMiss{key, {}, now, DataItem::REMOTE_DEVICE_DATA_MISS_QUERY, REMOTE_DEVICE_ID, now}; 548 Timestamp now = store->GetCurrentTimestamp(); variable [all …]
|
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/src/evloop/src/ |
D | event_loop_select.cpp | 46 auto now = std::chrono::system_clock::now(); in Poll() local 47 auto to = now + std::chrono::milliseconds(sleepTime); in Poll()
|
/foundation/resourceschedule/resource_schedule_service/cgroup_sched/common/include/ |
D | cgroup_sched_common.h | 34 t1 = Clock::now(); in ChronoScope() 39 t1 = Clock::now(); in ChronoScope() 44 Clock::time_point t2 = Clock::now(); in ~ChronoScope()
|
/foundation/arkui/ace_engine/frameworks/core/common/rosen/ |
D | rosen_window.cpp | 74 int64_t now = std::chrono::duration_cast<std::chrono::nanoseconds>( in VsyncThreadMain() local 75 std::chrono::steady_clock::now().time_since_epoch()).count(); in VsyncThreadMain() 77 callback(now, 0); in VsyncThreadMain()
|
/foundation/communication/dsoftbus/core/connection/common/src/ |
D | softbus_conn_common.c | 184 SoftBusSysTime now; in ConnectSoftBusCondWait() local 185 if (SoftBusGetTime(&now) != SOFTBUS_OK) { in ConnectSoftBusCondWait() 189 now.sec += (now.usec + (timeMillis * USECTONSEC)) / MICROSECONDS; in ConnectSoftBusCondWait() 190 now.usec = (now.usec + (timeMillis * USECTONSEC)) % MICROSECONDS; in ConnectSoftBusCondWait() 192 return SoftBusCondWait(cond, mutex, &now); in ConnectSoftBusCondWait()
|