/base/time/time_service/interfaces/inner_api/src/ |
H A D | time_service_client.cpp | 154 bool TimeServiceClient::GetTimeByClockId(clockid_t clockId, struct timespec &tv) in GetTimeByClockId() argument 156 if (clock_gettime(clockId, &tv) < 0) { in GetTimeByClockId() 468 struct timespec tv {}; in GetWallTimeMs() struct 469 if (!GetTimeByClockId(CLOCK_REALTIME, tv)) { in GetWallTimeMs() 473 time = tv.tv_sec * MILLI_TO_SEC + tv.tv_nsec / NANO_TO_MILLI; in GetWallTimeMs() 480 struct timespec tv {}; in GetWallTimeMs() struct 481 if (!GetTimeByClockId(CLOCK_REALTIME, tv)) { in GetWallTimeMs() 485 time = tv.tv_sec * MILLI_TO_SEC + tv in GetWallTimeMs() 493 struct timespec tv {}; GetWallTimeNs() struct 505 struct timespec tv {}; GetWallTimeNs() struct 518 struct timespec tv {}; GetBootTimeMs() struct 530 struct timespec tv {}; GetBootTimeMs() struct 543 struct timespec tv {}; GetBootTimeNs() struct 555 struct timespec tv {}; GetBootTimeNs() struct 568 struct timespec tv {}; GetMonotonicTimeMs() struct 580 struct timespec tv {}; GetMonotonicTimeMs() struct 593 struct timespec tv {}; GetMonotonicTimeNs() struct 605 struct timespec tv {}; GetMonotonicTimeNs() struct [all...] |
/base/inputmethod/imf/test/unittest/cpp_test/mock/ |
H A D | global.cpp | 25 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/inputmethod/imf/common/src/ |
H A D | global.cpp | 25 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/hiappevent/frameworks/native/libhiappevent/utility/ |
H A D | time_util.cpp | 53 struct timeval tv;
in GetTimeZone() local 54 if (gettimeofday(&tv, nullptr) != 0) {
in GetTimeZone() 57 time_t sysSec = tv.tv_sec;
in GetTimeZone()
|
/base/hiviewdfx/hitrace/frameworks/native/ |
H A D | hitracechainc.c | 117 struct timeval tv; in HiTraceChainGetDeviceId() local 118 gettimeofday(&tv, NULL); in HiTraceChainGetDeviceId() 119 srand(tv.tv_sec); in HiTraceChainGetDeviceId() 137 struct timeval tv; in HiTraceChainCreateChainId() local 138 gettimeofday(&tv, NULL); in HiTraceChainCreateChainId() 145 chainId.second = (uint64_t)(tv.tv_sec); in HiTraceChainCreateChainId() 146 chainId.usecond = (uint64_t)(tv.tv_usec); in HiTraceChainCreateChainId() 240 struct timeval tv; in HiTraceChainCreateSpan() local 241 gettimeofday(&tv, NULL); in HiTraceChainCreateSpan() 247 hashData[3] = (uint32_t)(tv in HiTraceChainCreateSpan() [all...] |
/base/time/time_service/framework/cj/src/ |
H A D | system_date_time.cpp | 91 struct timespec tv {}; in GetDeviceTime() struct 92 if (clock_gettime(clockId, &tv) < 0) { in GetDeviceTime() 98 time = tv.tv_sec * SECONDS_TO_NANO + tv.tv_nsec; in GetDeviceTime() 100 time = tv.tv_sec * SECONDS_TO_MILLI + tv.tv_nsec / NANO_TO_MILLI; in GetDeviceTime()
|
/base/telephony/ril_adapter/services/hril/src/ |
H A D | hril_event.cpp | 30 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 52 timersub(&eventIt->timeout, &now, &tv); in GetNextTimeOut() 55 tv.tv_sec = tv.tv_usec = 0; in GetNextTimeOut() 155 void HRilEvent::AddTimerEvent(HRilEventMessage &eventMsg, const struct timeval &tv) in AddTimerEvent() argument 162 timeradd(&now, &tv, &eventMsg.timeout); in AddTimerEvent()
|
H A D | hril_timer_callback.cpp | 69 HRilCallbackFun func, uint8_t *param, const struct timeval *tv) in HRilSetTimerCallbackInfo() 80 if (tv == NULL) { in HRilSetTimerCallbackInfo() 83 (void)memcpy_s(&timeout, sizeof(timeout), tv, sizeof(timeout)); in HRilSetTimerCallbackInfo() 68 HRilSetTimerCallbackInfo( HRilCallbackFun func, uint8_t *param, const struct timeval *tv) HRilSetTimerCallbackInfo() argument
|
/base/telephony/ril_adapter/services/hril/include/ |
H A D | hril_event.h | 44 void AddTimerEvent(HRilEventMessage &eventMsg, const struct timeval &tv); 54 void GetNowTime(struct timeval &tv); 55 bool GetNextTimeOut(struct timeval &tv);
|
H A D | hril_timer_callback.h | 40 HRilCallbackFun func, uint8_t *param, const struct timeval *tv);
|
/base/time/time_service/services/time/src/ |
H A D | ntp_trusted_time.cpp | 99 struct timespec tv {}; in GetBootTimeNs() struct 100 if (clock_gettime(CLOCK_BOOTTIME, &tv) < 0) { in GetBootTimeNs() 103 timeNow = tv.tv_sec * NANO_TO_SECOND + tv.tv_nsec; in GetBootTimeNs()
|
/base/time/time_service/services/ |
H A D | time_system_ability.cpp | 470 struct timeval tv {}; in SetRealTime() struct 471 tv.tv_sec = (time_t)(time / MILLI_TO_BASE); in SetRealTime() 472 tv.tv_usec = (suseconds_t)((time % MILLI_TO_BASE) * MILLI_TO_MICR); in SetRealTime() 473 int result = settimeofday(&tv, nullptr); in SetRealTime() 479 auto ret = SetRtcTime(tv.tv_sec); in SetRealTime() 741 struct timespec tv {}; in GetWallTimeMs() struct 742 if (GetTimeByClockId(CLOCK_REALTIME, tv)) { in GetWallTimeMs() 743 time = tv.tv_sec * MILLI_TO_BASE + tv.tv_nsec / NANO_TO_MILLI; in GetWallTimeMs() 751 struct timespec tv {}; in GetBootTimeMs() struct 761 struct timespec tv {}; GetBootTimeNs() struct 771 struct timespec tv {}; GetThreadTimeMs() struct 786 struct timespec tv {}; GetThreadTimeNs() struct 799 GetTimeByClockId(clockid_t clockId, struct timespec &tv) GetTimeByClockId() argument [all...] |
/base/hiviewdfx/hitrace/test/unittest/common/native/ |
H A D | hitracechainc_test.cpp | 89 struct timeval tv; in GenerateChainId() local 90 gettimeofday(&tv, nullptr); in GenerateChainId() 91 srand(tv.tv_sec); in GenerateChainId() 92 hashData[ARRAY_FIRST_INDEX] = tv.tv_sec; in GenerateChainId() 93 hashData[ARRAY_SECOND_INDEX] = tv.tv_usec; in GenerateChainId() 103 struct timeval tv; in GenerateSpanId() local 104 gettimeofday(&tv, nullptr); in GenerateSpanId() 105 srand(tv.tv_sec); in GenerateSpanId() 107 hashData[ARRAY_SECOND_INDEX] = tv.tv_sec; in GenerateSpanId() 108 hashData[ARRAY_THIRD_INDEX] = tv in GenerateSpanId() 117 struct timeval tv; GenerateParentSpanId() local [all...] |
H A D | hitracechaincpp_test.cpp | 60 struct timeval tv; in GenerateChainId() local 61 gettimeofday(&tv, nullptr); in GenerateChainId() 62 srand(tv.tv_sec); in GenerateChainId() 63 hashData[ARRAY_FIRST_INDEX] = tv.tv_sec; in GenerateChainId() 64 hashData[ARRAY_SECOND_INDEX] = tv.tv_usec; in GenerateChainId() 75 struct timeval tv; in GenerateSpanId() local 76 gettimeofday(&tv, nullptr); in GenerateSpanId() 77 srand(tv.tv_sec); in GenerateSpanId() 79 hashData[ARRAY_SECOND_INDEX] = tv.tv_sec; in GenerateSpanId() 80 hashData[ARRAY_THIRD_INDEX] = tv in GenerateSpanId() 89 struct timeval tv; GenerateParentSpanId() local [all...] |
/base/update/updater/services/log/ |
H A D | log.cpp | 88 struct timeval tv {}; in GetFormatTime() struct 91 gettimeofday(&tv, nullptr); in GetFormatTime() 92 localtime_r(&tv.tv_sec, &tm); in GetFormatTime() 95 static_cast<int>(tv.tv_usec / 1000)); // need div 1000 in GetFormatTime()
|
/base/hiviewdfx/hiview/plugins/freeze_detector/ |
H A D | resolver.cpp | 139 struct timeval tv; in GetTimeZone() local 141 if (gettimeofday(&tv, &tz) != 0) { in GetTimeZone()
|
/base/telephony/ril_adapter/services/hril_hdf/include/ |
H A D | hril_hdf.h | 44 extern void OnTimerCallback(HRilCallbackFun func, uint8_t *param, const struct timeval *tv);
|
/base/msdp/device_status/tools/vdev/src/ |
H A D | v_input_device.cpp | 127 struct timeval tv; in SendEvent() member 128 if (gettimeofday(&tv, nullptr) != 0) { in SendEvent() 132 event.input_event_sec = tv.tv_sec; in SendEvent() 133 event.input_event_usec = tv.tv_usec; in SendEvent()
|
/base/telephony/ril_adapter/interfaces/innerkits/include/ |
H A D | hril.h | 55 void (*OnTimerCallback)(HRilCallbackFun func, uint8_t *param, const struct timeval *tv);
|
/base/telephony/ril_adapter/services/vendor/include/ |
H A D | vendor_report.h | 35 void OnTimerCallback(HRilCallbackFun func, uint8_t *param, const struct timeval *tv);
|
/base/telephony/ril_adapter/test/unittest/ril_adapter_gtest/ |
H A D | ril_adapter_service_test.cpp | 179 timeval *tv = nullptr; in HWTEST_F() local 180 ASSERT_EQ(hRilTimerCallback.HRilSetTimerCallbackInfo(func, param, tv), nullptr); in HWTEST_F()
|
/base/update/updateservice/services/firmware/check/include/ |
H A D | firmware_icheck.h | 92 struct timeval tv = {TIMEOUT_FOR_CONNECT, 0}; in DoAction() local 93 setsockopt(engineSocket, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(struct timeval)); in DoAction()
|
/base/time/time_service/framework/js/napi/system_date_time/src/ |
H A D | napi_system_date_time.cpp | 508 struct timespec tv {}; in GetDeviceTime() struct 509 if (clock_gettime(clockId, &tv) < 0) { in GetDeviceTime() 515 time = tv.tv_sec * SECONDS_TO_NANO + tv.tv_nsec; in GetDeviceTime() 517 time = tv.tv_sec * SECONDS_TO_MILLI + tv.tv_nsec / NANO_TO_MILLI; in GetDeviceTime()
|
/base/telephony/call_manager/services/call/src/ |
H A D | call_base.cpp | 264 struct timeval tv; in StateChangesToActive() local 265 gettimeofday(&tv, nullptr); in StateChangesToActive() 266 startTime_ = tv.tv_sec * MILLI_TO_BASE + tv.tv_usec / MILLI_TO_BASE; in StateChangesToActive()
|
/base/time/time_service/interfaces/inner_api/include/ |
H A D | time_service_client.h | 477 bool GetTimeByClockId(clockid_t clockId, struct timespec &tv);
|