Home
last modified time | relevance | path

Searched refs:tv (Results 1 – 25 of 27) sorted by relevance

12

/base/time/time_service/services/
Dtime_system_ability.cpp357 struct timeval tv {}; in SetRealTime() struct
358 tv.tv_sec = (time_t)(time / MILLI_TO_BASE); in SetRealTime()
359 tv.tv_usec = (suseconds_t)((time % MILLI_TO_BASE) * MILLI_TO_MICR); in SetRealTime()
360 int result = settimeofday(&tv, nullptr); in SetRealTime()
365 auto ret = SetRtcTime(tv.tv_sec); in SetRealTime()
602 struct timespec tv {}; in GetWallTimeMs() struct
603 if (GetTimeByClockid(CLOCK_REALTIME, tv)) { in GetWallTimeMs()
604 times = tv.tv_sec * MILLI_TO_BASE + tv.tv_nsec / NANO_TO_MILLI; in GetWallTimeMs()
612 struct timespec tv {}; in GetWallTimeNs() struct
613 if (GetTimeByClockid(CLOCK_REALTIME, tv)) { in GetWallTimeNs()
[all …]
Dtime_system_ability.h92 bool GetTimeByClockid(clockid_t clockId, struct timespec &tv);
/base/inputmethod/imf/services/src/
Dglobal.cpp25 struct timeval tv; in LogTimeStamp() local
26 gettimeofday(&tv, nullptr); in LogTimeStamp()
28 localtime_r(&tv.tv_sec, &nowTime); in LogTimeStamp()
31 nowTime.tm_sec, static_cast<int32_t>(tv.tv_usec) / millSec); in LogTimeStamp()
/base/hiviewdfx/hitrace/frameworks/native/
Dhitracechainc.c111 struct timeval tv; in HiTraceChainGetDeviceId() local
112 gettimeofday(&tv, NULL); in HiTraceChainGetDeviceId()
113 srand(tv.tv_sec); in HiTraceChainGetDeviceId()
131 struct timeval tv; in HiTraceChainCreateChainId() local
132 gettimeofday(&tv, NULL); in HiTraceChainCreateChainId()
139 chainId.second = (uint64_t)(tv.tv_sec); in HiTraceChainCreateChainId()
140 chainId.usecond = (uint64_t)(tv.tv_usec); in HiTraceChainCreateChainId()
234 struct timeval tv; in HiTraceChainCreateSpan() local
235 gettimeofday(&tv, NULL); in HiTraceChainCreateSpan()
241 hashData[3] = (uint32_t)(tv.tv_sec); // 3: second in HiTraceChainCreateSpan()
[all …]
/base/telephony/ril_adapter/services/hril/src/
Dhril_event.cpp30 void HRilEvent::GetNowTime(struct timeval &tv) in GetNowTime() argument
34 tv.tv_sec = ts.tv_sec; in GetNowTime()
35 tv.tv_usec = ts.tv_nsec / TIME_UNIT; in GetNowTime()
38 bool HRilEvent::GetNextTimeOut(struct timeval &tv) in GetNextTimeOut() argument
51 timersub(&eventIt->timeout, &now, &tv); in GetNextTimeOut()
54 tv.tv_sec = tv.tv_usec = 0; in GetNextTimeOut()
134 void HRilEvent::AddTimerEvent(HRilEventMessage &eventMsg, const struct timeval &tv) in AddTimerEvent() argument
141 timeradd(&now, &tv, &eventMsg.timeout); in AddTimerEvent()
Dhril_timer_callback.cpp69 HRilCallbackFun func, uint8_t *param, const struct timeval *tv) in HRilSetTimerCallbackInfo() argument
80 if (tv == NULL) { in HRilSetTimerCallbackInfo()
83 (void)memcpy_s(&timeout, sizeof(timeout), tv, sizeof(timeout)); in HRilSetTimerCallbackInfo()
Dhril_manager.cpp200 struct timeval tv = { 0, RUNNING_LOCK_DEFAULT_TIMEOUT_US }; in ApplyRunningLock() local
204 timerCallback_->HRilSetTimerCallbackInfo(RunningLockCallback, serialNum, &tv); in ApplyRunningLock()
1102 void OnTimerCallback(HRilCallbackFun func, uint8_t *param, const struct timeval *tv) in OnTimerCallback() argument
1108 g_manager->timerCallback_->HRilSetTimerCallbackInfo(func, param, tv); in OnTimerCallback()
/base/telephony/ril_adapter/services/hril/include/
Dhril_event.h44 void AddTimerEvent(HRilEventMessage &eventMsg, const struct timeval &tv);
54 void GetNowTime(struct timeval &tv);
55 bool GetNextTimeOut(struct timeval &tv);
Dhril_timer_callback.h40 HRilCallbackFun func, uint8_t *param, const struct timeval *tv);
/base/update/updater/services/log/
Dlog.cpp85 struct timeval tv {}; in GetFormatTime() struct
88 gettimeofday(&tv, nullptr); in GetFormatTime()
89 localtime_r(&tv.tv_sec, &tm); in GetFormatTime()
92 static_cast<int>(tv.tv_usec / 1000)); // need div 1000 in GetFormatTime()
/base/msdp/device_status/tools/vdev/src/
Dv_input_device.cpp126 struct timeval tv; in SendEvent() local
127 if (gettimeofday(&tv, nullptr) != 0) { in SendEvent()
131 event.input_event_sec = tv.tv_sec; in SendEvent()
132 event.input_event_usec = tv.tv_usec; in SendEvent()
/base/telephony/ril_adapter/services/hril_hdf/include/
Dhril_hdf.h44 extern void OnTimerCallback(HRilCallbackFun func, uint8_t *param, const struct timeval *tv);
/base/hiviewdfx/hiview/plugins/freeze_detector/
Dresolver.cpp136 struct timeval tv; in GetTimeZone() local
138 if (gettimeofday(&tv, &tz) != 0) { in GetTimeZone()
/base/telephony/ril_adapter/services/vendor/include/
Dvendor_report.h35 void OnTimerCallback(HRilCallbackFun func, uint8_t *param, const struct timeval *tv);
/base/telephony/ril_adapter/interfaces/innerkits/include/
Dhril.h55 void (*OnTimerCallback)(HRilCallbackFun func, uint8_t *param, const struct timeval *tv);
/base/update/updateservice/services/firmware/check/include/
Dfirmware_icheck.h88 struct timeval tv = {TIMEOUT_FOR_CONNECT, 0}; in DoAction() local
89 setsockopt(engineSocket, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(struct timeval)); in DoAction()
/base/time/time_service/framework/js/napi/system_date_time/src/
Dnapi_system_date_time.cpp455 struct timespec tv {}; in GetDeviceTime() struct
456 if (clock_gettime(clockId, &tv) < 0) { in GetDeviceTime()
462 time = tv.tv_sec * SECONDS_TO_NANO + tv.tv_nsec; in GetDeviceTime()
464 time = tv.tv_sec * SECONDS_TO_MILLI + tv.tv_nsec / NANO_TO_MILLI; in GetDeviceTime()
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/
Dhiappevent_base.cpp49 struct timeval tv; in GetTimeInfo() local
50 if (gettimeofday(&tv, nullptr) != 0) { in GetTimeInfo()
54 …int64_t timeMillSec = static_cast<int64_t>(tv.tv_sec) * 1000 + tv.tv_usec / 1000; // 1000 means mi… in GetTimeInfo()
59 time_t sysSec = tv.tv_sec; in GetTimeInfo()
/base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/
Dhisysevent.cpp48 struct timeval tv; in GetTimeZone() local
49 if (gettimeofday(&tv, nullptr) != 0) { in GetTimeZone()
53 time_t sysSec = tv.tv_sec; in GetTimeZone()
Dinner_writer.cpp42 struct timeval tv; in GetTimeZone() local
43 if (gettimeofday(&tv, nullptr) != 0) { in GetTimeZone()
47 time_t sysSec = tv.tv_sec; in GetTimeZone()
/base/telephony/ril_adapter/services/vendor/src/
Dvendor_report.c81 void OnTimerCallback(HRilCallbackFun func, uint8_t *param, const struct timeval *tv) in OnTimerCallback() argument
84 g_reportOps->OnTimerCallback(func, param, tv); in OnTimerCallback()
Dat_data.c753 struct timeval tv = {0, CALLBACK_DELAY_MS * DELAY_US_OFFSET}; in PdpContextListUpdate() local
754 OnTimerCallback(PdpContextListCallback, NULL, &tv); in PdpContextListUpdate()
/base/startup/appspawn/standard/
Dappspawn_service.c287 struct timeval tv; in WaitChild() local
290 tv.tv_sec = TV_SEC; in WaitChild()
291 tv.tv_usec = 0; in WaitChild()
293 int ret = select(fd + 1, &rd, NULL, NULL, &tv); in WaitChild()
/base/time/time_service/services/timer/src/
Dtimer_manager.cpp471 struct timespec tv {}; in GetBootTimeNs() struct
472 if (clock_gettime(CLOCK_BOOTTIME, &tv) < 0) { in GetBootTimeNs()
475 timeNow = tv.tv_sec * NANO_TO_SECOND + tv.tv_nsec; in GetBootTimeNs()
/base/security/permission_lite/
DREADME_zh.md130 "phone", "tv","tablet", "car","smartWatch","sportsWatch","smartCamera", "smartVision"

12