Home
last modified time | relevance | path

Searched refs:tv_nsec (Results 1 – 25 of 59) sorted by relevance

123

/base/hiviewdfx/hilog/frameworks/libhilog/utils/include/
Dlog_timestamp.h34 tv_nsec = static_cast<uint32_t>(time.tv_nsec); in LogTimeStamp()
39 tv_nsec(static_cast<uint32_t>(time.tv_nsec)) {} in LogTimeStamp()
42 : tv_sec(sec), tv_nsec(nsec) {} in tv_sec()
46 return (tv_sec == time.tv_sec) && (tv_nsec == time.tv_nsec);
57 ((tv_sec == time.tv_sec) && (tv_nsec < time.tv_nsec));
68 ((tv_sec == time.tv_sec) && (tv_nsec > time.tv_nsec));
78 tv_sec = tv_nsec = 0;
81 if (this->tv_nsec < time.tv_nsec) {
83 this->tv_nsec = NS_PER_SEC + this->tv_nsec - time.tv_nsec;
85 this->tv_nsec -= time.tv_nsec;
[all …]
Dlog_print.h30 uint32_t tv_nsec; member
/base/security/huks/services/huks_standard/huks_engine/main/core_dependency/src/
Dhks_core_hal_api.c32 …if ((curTime.tv_sec >= ((UINT64_MAX - S_TO_MS) / S_TO_MS)) || (curTime.tv_nsec / MS_TO_NS >= S_TO_… in HksCoreHalElapsedRealTime()
36 *timestampMs = (uint64_t)(curTime.tv_sec * S_TO_MS + curTime.tv_nsec / MS_TO_NS); in HksCoreHalElapsedRealTime()
/base/startup/init/services/loopevent/task/
Dle_asynctask.c47 if (endTime.tv_nsec > startTime.tv_nsec) { in DoAsyncEvent_()
48 diff += (endTime.tv_nsec - startTime.tv_nsec) / THOUSAND_MILLISECOND; // 1000 ms in DoAsyncEvent_()
50 diff -= (endTime.tv_nsec - startTime.tv_nsec) / THOUSAND_MILLISECOND; // 1000 ms in DoAsyncEvent_()
/base/hiviewdfx/hilog/services/hilogd/
Dlog_stats.cpp42 LogTimeStamp ts_mono(info.mono_sec, info.tv_nsec); in UpdateStats()
63 entry.monoTimeAuditStart.SetTimeStamp(info.mono_sec, info.tv_nsec); in UpdateStats()
72 entry.monoTimeLast.SetTimeStamp(info.mono_sec, info.tv_nsec); in UpdateStats()
73 entry.realTimeLast.SetTimeStamp(info.tv_sec, info.tv_nsec); in UpdateStats()
100 entry.realTimeFreqMax.SetTimeStamp(info.tv_sec, info.tv_nsec); in StatsInfo2NewStatsEntry()
103 entry.realTimeThroughputMax.SetTimeStamp(info.tv_sec, info.tv_nsec); in StatsInfo2NewStatsEntry()
104 entry.realTimeLast.SetTimeStamp(info.tv_sec, info.tv_nsec); in StatsInfo2NewStatsEntry()
105 entry.monoTimeLast.SetTimeStamp(info.mono_sec, info.tv_nsec); in StatsInfo2NewStatsEntry()
106 entry.monoTimeAuditStart.SetTimeStamp(info.mono_sec, info.tv_nsec); in StatsInfo2NewStatsEntry()
Dlog_collector.cpp46 dropMsg->tv_nsec = msg.tv_nsec; in InsertDropInfo()
120 .tv_nsec = msg.tv_nsec, in onDataRecv()
Dkmsg_parser.cpp135 auto uptime = seconds{t_uptime.tv_sec} + nanoseconds{t_uptime.tv_nsec}; in BootTime()
178 msg.tv_nsec = static_cast<uint32_t>(logts.tv_nsec); in ParseKmsg()
/base/hiviewdfx/hilog/services/hilogd/include/
Dlog_data.h35 uint32_t tv_nsec; member
71 … tv_sec(msg.tv_sec), tv_nsec(msg.tv_nsec), mono_sec(msg.mono_sec), pid(msg.pid), tid(msg.tid), in HilogData()
Dlog_stats.h43 uint32_t tv_nsec; member
121 … std::cout << "Max freq ts: " << realTimeFreqMax.tv_sec << "." << realTimeFreqMax.tv_nsec << sep; in Print()
124 std::cout << realTimeThroughputMax.tv_nsec << sep; in Print()
/base/security/device_security_level/baselib/utils/src/
Dutils_datetime.c35 return (ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC); in GetMillisecondSinceBoot()
42 return ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in GetMillisecondSince1970()
/base/powermgr/powermgr_lite/utils/src/
Dpower_mgr_time_util.c22 return SecToMsec(ts.tv_sec) + NsecToMsec(ts.tv_nsec); in GetCurrentTimeMsec()
/base/startup/init/test/moduletest/
Dparam_test_cmds.c342 if (endTime.tv_nsec > startTime->tv_nsec) { in DiffLocalTime()
343 diff += (endTime.tv_nsec - startTime->tv_nsec) / 1000; // 1000 1ms in DiffLocalTime()
345 diff -= (startTime->tv_nsec - endTime.tv_nsec) / 1000; // 1000 1ms in DiffLocalTime()
/base/hiviewdfx/hilog/frameworks/libhilog/utils/
Dlog_print.cpp115 out << setw(MSEC_WIDTH) << (content.tv_nsec / NS2MS); in PrintLogPrefix()
117 out << setw(USEC_WIDTH) << (content.tv_nsec / NS2US); in PrintLogPrefix()
119 out << setw(NSEC_WIDTH) << content.tv_nsec; in PrintLogPrefix()
/base/powermgr/battery_statistics/utils/native/src/
Dstats_helper.cpp39 rawBootTime.tv_nsec / StatsUtils::NS_IN_MS); in GetBootTimeMs()
54 rawUpTime.tv_nsec / StatsUtils::NS_IN_MS); in GetUpTimeMs()
/base/hiviewdfx/hilog/frameworks/libhilog/
Dhilog_printf.cpp156 .tv_nsec = header.tv_nsec, in PrintLog()
188 header.tv_nsec = static_cast<uint32_t>(ts.tv_nsec); in HiLogPrintArgs()
/base/startup/appspawn_lite/services/src/
Dappspawn_process.c167 … long timeUsed = (tmEnd.tv_sec - tmStart.tv_sec) * 1000000000L + (tmEnd.tv_nsec - tmStart.tv_nsec); in CreateProcess()
Dappspawn_service.c149 … long timeUsed = (tmEnd.tv_sec - tmStart.tv_sec) * 1000000000L + (tmEnd.tv_nsec - tmStart.tv_nsec); in Invoke()
/base/time/time_service/services/
Dtime_system_ability.cpp578 times = tv.tv_sec * MILLI_TO_BASE + tv.tv_nsec / NANO_TO_MILLI; in GetWallTimeMs()
588 times = tv.tv_sec * NANO_TO_BASE + tv.tv_nsec; in GetWallTimeNs()
598 times = tv.tv_sec * MILLI_TO_BASE + tv.tv_nsec / NANO_TO_MILLI; in GetBootTimeMs()
608 times = tv.tv_sec * NANO_TO_BASE + tv.tv_nsec; in GetBootTimeNs()
618 times = tv.tv_sec * MILLI_TO_BASE + tv.tv_nsec / NANO_TO_MILLI; in GetMonotonicTimeMs()
628 times = tv.tv_sec * NANO_TO_BASE + tv.tv_nsec; in GetMonotonicTimeNs()
645 times = tv.tv_sec * MILLI_TO_BASE + tv.tv_nsec / NANO_TO_MILLI; in GetThreadTimeMs()
662 times = tv.tv_sec * NANO_TO_BASE + tv.tv_nsec; in GetThreadTimeNs()
/base/startup/init/services/loopevent/timer/
Dle_timer.c32 timeValue.it_interval.tv_nsec = nsec; in SetTimer_()
34 timeValue.it_value.tv_nsec = nsec; in SetTimer_()
/base/security/access_token/services/accesstokenmanager/main/cpp/src/permission/
Dpermission_grant_event.cpp35 return curTime.tv_sec * MS_PER_S + curTime.tv_nsec / NS_PER_MS; in GetRealTimeStamp()
/base/startup/appspawn/lite/
Dappspawn_service.c169 … long timeUsed = (tmEnd.tv_sec - tmStart.tv_sec) * 1000000000L + (tmEnd.tv_nsec - tmStart.tv_nsec); in Invoke()
/base/powermgr/thermal_manager/application/protector/src/
Dthermal_protector_timer.cpp119 itval.it_interval.tv_nsec = 0; in SetTimerInterval()
121 itval.it_value.tv_nsec = 0; in SetTimerInterval()
/base/startup/appspawn_lite/services/test/unittest/common/
Dmessage_func_test.cpp253 …sed = (tmEnd.tv_sec - tmStart.tv_sec) * NANOSECONDS_PER_SECOND + (tmEnd.tv_nsec - tmStart.tv_nsec);
285 …sed = (tmEnd.tv_sec - tmStart.tv_sec) * NANOSECONDS_PER_SECOND + (tmEnd.tv_nsec - tmStart.tv_nsec);
/base/startup/appspawn/test/unittest/app_spawn_lite_test/
Dapp_spawn_lite_test.cpp307 …sed = (tmEnd.tv_sec - tmStart.tv_sec) * NANOSECONDS_PER_SECOND + (tmEnd.tv_nsec - tmStart.tv_nsec);
339 …sed = (tmEnd.tv_sec - tmStart.tv_sec) * NANOSECONDS_PER_SECOND + (tmEnd.tv_nsec - tmStart.tv_nsec);
/base/hiviewdfx/hilog/services/hilogtool/
Dlog_display.cpp52 static string TimeStr(uint32_t tv_sec, uint32_t tv_nsec) in TimeStr() argument
63 ret = snprintf_s(buffer + len, TIME_W - len, TIME_W - len - 1, ".%03u", tv_nsec / NS2MS); in TimeStr()
127 static string DurationStr(uint32_t tv_sec, uint32_t tv_nsec) in DurationStr() argument
135 uint32_t msec = tv_nsec / NS2MS; in DurationStr()

123