Home
last modified time | relevance | path

Searched refs:tv (Results 1 - 25 of 59) sorted by relevance

123

/foundation/communication/bluetooth/frameworks/inner/src/
H A Dbluetooth_socket_outputstream.cpp29 struct timeval tv; in GetNowTimestamp() local
30 gettimeofday(&tv, nullptr); in GetNowTimestamp()
31 int64_t timestamp = tv.tv_sec * 1000 + tv.tv_usec / 1000; in GetNowTimestamp()
H A Duuid.cpp76 struct timeval tv; in RandomUUID() local
82 gettimeofday(&tv, &tz); in RandomUUID()
83 localtime_r(&tv.tv_sec, &randomTime); in RandomUUID()
84 random.uuid_[15] = static_cast<uint8_t>(tv.tv_usec & 0x00000000000000FF); // 15是uuid的数组下标 in RandomUUID()
85 random.uuid_[14] = static_cast<uint8_t>((tv.tv_usec & 0x000000000000FF00) >> 8); // 14是uuid的数组下标,右移8位 in RandomUUID()
86 random.uuid_[13] = static_cast<uint8_t>((tv.tv_usec & 0x0000000000FF0000) >> 16); // 13是uuid的数组下标,右移16位 in RandomUUID()
87 random.uuid_[12] = static_cast<uint8_t>((tv.tv_usec & 0x00000000FF000000) >> 24); // 12是uuid的数组下标,右移24位 in RandomUUID()
88 random.uuid_[10] = static_cast<uint8_t>((tv.tv_usec & 0x000000FF00000000) >> 32); // 10是uuid的数组下标,右移32位 in RandomUUID()
89 random.uuid_[9] = static_cast<uint8_t>((tv.tv_usec & 0x0000FF0000000000) >> 40); // 9是uuid的数组下标,右移40位 in RandomUUID()
90 random.uuid_[8] = static_cast<uint8_t>((tv in RandomUUID()
[all...]
/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_common/
H A Dwifi_netlink.cpp89 struct timeval tv; in SendCmdKernel() local
108 tv.tv_sec = 1; in SendCmdKernel()
109 tv.tv_usec = 0; in SendCmdKernel()
110 if (setsockopt(sockFd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)) < 0) { in SendCmdKernel()
169 struct timeval tv; in ProcessReportMsg() local
178 tv.tv_sec = 1; in ProcessReportMsg()
179 tv.tv_usec = 0; in ProcessReportMsg()
180 if (setsockopt(sockFd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) < in ProcessReportMsg()
[all...]
/foundation/CastEngine/castengine_wifi_display/services/protocol/rtcp/src/
H A Drtcp.cpp100 RtcpSR &RtcpSR::SetNtpStamp(timeval tv) in SetNtpStamp() argument
102 ntpmsw_ = htonl(tv.tv_sec + 0x83AA7E80); /* 0x83AA7E80 is the number of seconds from 1900 to 1970 */ in SetNtpStamp()
103 ntplsw_ = htonl((uint32_t)((double)tv.tv_usec * (double)(((uint64_t)1) << 32) * 1.0e-6)); // 32:byte offset in SetNtpStamp()
109 timeval tv; in SetNtpStamp() local
110 tv.tv_sec = unixStampMs / 1000; // 1000:unit in SetNtpStamp()
111 tv.tv_usec = (unixStampMs % 1000) * 1000; // 1000:unit in SetNtpStamp()
112 return SetNtpStamp(tv); in SetNtpStamp()
117 struct timeval tv; in GetNtpStamp() local
118 tv.tv_sec = ntpmsw_ - 0x83AA7E80; in GetNtpStamp()
119 tv in GetNtpStamp()
141 struct timeval tv; GetNtpUnixStampMS() local
[all...]
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/app/src/flowctrl_manager/
H A Dkvstore_flowctrl_manager.cpp27 struct timeval tv = { 0, 0 }; in CurrentTimeMicros() local
28 gettimeofday(&tv, nullptr); in CurrentTimeMicros()
29 return (tv.tv_sec * SECOND_TO_MICROSECOND + tv.tv_usec / SECOND_TO_MICROSECOND); in CurrentTimeMicros()
/foundation/communication/dsoftbus/components/nstackx/nstackx_core/platform/liteos/dfile/
H A Dsys_dfile_session.c26 struct timeval tv; in WaitSocketEvent() local
60 tv.tv_sec = timeoutMs / NSTACKX_MILLI_TICKS; in WaitSocketEvent()
61 tv.tv_usec = (timeoutMs % NSTACKX_MILLI_TICKS) * NSTACKX_MICRO_SEC_PER_MILLI_SEC; in WaitSocketEvent()
63 int32_t ret = select(nfds, &readFds, &writeFds, NULL, &tv); in WaitSocketEvent()
/foundation/communication/dsoftbus/components/nstackx/nstackx_core/platform/unix/dfile/
H A Dsys_dfile_session.c26 struct timeval tv; in WaitSocketEvent() local
60 tv.tv_sec = timeoutMs / NSTACKX_MILLI_TICKS; in WaitSocketEvent()
61 tv.tv_usec = (timeoutMs % NSTACKX_MILLI_TICKS) * NSTACKX_MICRO_SEC_PER_MILLI_SEC; in WaitSocketEvent()
63 int32_t ret = select(nfds, &readFds, &writeFds, NULL, &tv); in WaitSocketEvent()
/foundation/communication/dsoftbus/components/nstackx/fillp/src/public/include/
H A Dlog.h37 static inline void FillpLogGetNowTime(struct timeval *tv, struct tm *nowTime) in FillpLogGetNowTime() argument
39 (void)gettimeofday(tv, FILLP_NULL_PTR); in FillpLogGetNowTime()
40 time_t sec = (time_t)tv->tv_sec; in FillpLogGetNowTime()
45 struct timeval tv; \
47 FillpLogGetNowTime(&tv, &nowTime); \
51 (long)tv.tv_usec, __func__, __LINE__, _pre, ##__VA_ARGS__); \
/foundation/arkui/ace_engine/frameworks/core/components/picker/
H A Dtoss_animation_controller.cpp112 struct timeval tv = { 0 }; in GetCurrentTime() local
113 int result = gettimeofday(&tv, nullptr); in GetCurrentTime()
119 double sec = static_cast<double>(tv.tv_sec); in GetCurrentTime()
120 double msec = static_cast<double>(tv.tv_usec / 1000.0); // usec / 1000 is msec in GetCurrentTime()
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/utils/
H A DperformanceCaculate.cpp68 struct timespec tv {}; in GetUpTime() struct
69 if (clock_gettime(CLOCK_BOOTTIME, &tv) >= 0) { in GetUpTime()
70 time = tv.tv_sec * SECOND_TO_NANO + tv.tv_nsec; in GetUpTime()
/foundation/multimedia/av_codec/test/nativedemo/avmuxer/
H A Davmuxer_demo_common.c152 struct timeval tv; in GetTimestamp() local
154 gettimeofday(&tv, NULL); in GetTimestamp()
155 tmp = tv.tv_sec; in GetTimestamp()
157 tmp = tmp + tv.tv_usec; in GetTimestamp()
/foundation/ai/intelligent_voice_framework/utils/
H A Dtime_util.cpp129 struct timeval tv; in GetCurrTimeUs() local
131 if (gettimeofday(&tv, nullptr) == -1) { in GetCurrTimeUs()
135 struct tm *timeInfo = localtime(&tv.tv_sec); in GetCurrTimeUs()
141 ss << tv.tv_usec; in GetCurrTimeUs()
/foundation/distributeddatamgr/pasteboard/services/dfx/src/
H A Dcalculate_time_consuming.cpp117 struct timeval tv = { 0, 0 }; in GetCurrentTimeMicros() local
118 gettimeofday(&tv, nullptr); in GetCurrentTimeMicros()
119 return (tv.tv_sec * SEC_TO_MILLISEC + tv.tv_usec / MICROSEC_TO_MILLISEC); in GetCurrentTimeMicros()
/foundation/graphic/graphic_2d/rosen/test/2d_graphics/drawing_ndk/cpp/
H A Dtest_base.cpp102 struct timespec tv {}; in LogStart() struct
103 if (clock_gettime(CLOCK_BOOTTIME, &tv) >= 0) { in LogStart()
104 start = tv.tv_sec * SECOND_TO_NANO + tv.tv_nsec; in LogStart()
112 struct timespec tv {}; in LogEnd() struct
113 if (clock_gettime(CLOCK_BOOTTIME, &tv) >= 0) { in LogEnd()
114 end = tv.tv_sec * SECOND_TO_NANO + tv.tv_nsec; in LogEnd()
/foundation/distributedhardware/distributed_screen/common/src/
H A Ddscreen_util.cpp40 struct timeval tv; in GetCurrentTimeUs() local
41 gettimeofday(&tv, nullptr); in GetCurrentTimeUs()
42 return tv.tv_sec * usOneSecond + tv.tv_usec; in GetCurrentTimeUs()
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/picker/
H A Dtoss_animation_controller.cpp158 struct timeval tv = { 0 }; in GetCurrentTime() local
159 int result = gettimeofday(&tv, nullptr); in GetCurrentTime()
164 double sec = static_cast<double>(tv.tv_sec); in GetCurrentTime()
165 double msec = static_cast<double>(tv.tv_usec / 1000.0); // usec / 1000 is msec in GetCurrentTime()
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text_picker/
H A Dtoss_animation_controller.cpp162 struct timeval tv = { 0 }; in GetCurrentTime() local
163 int result = gettimeofday(&tv, nullptr); in GetCurrentTime()
168 double sec = static_cast<double>(tv.tv_sec); in GetCurrentTime()
169 double msec = static_cast<double>(tv.tv_usec / 1000.0); // usec / 1000 is msec in GetCurrentTime()
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/time_picker/
H A Dtoss_animation_controller.cpp163 struct timeval tv = { 0 }; in GetCurrentTime() local
164 int result = gettimeofday(&tv, nullptr); in GetCurrentTime()
169 double sec = static_cast<double>(tv.tv_sec); in GetCurrentTime()
170 double msec = static_cast<double>(tv.tv_usec / 1000.0); // usec / 1000 is msec in GetCurrentTime()
/foundation/communication/bluetooth/frameworks/inner/ipc/common/
H A Dbt_uuid.cpp34 struct timeval tv = {}; in Random() local
41 gettimeofday(&tv, &tz); in Random()
42 localtime_r(&tv.tv_sec, &randomTime); in Random()
44 tvUsec = static_cast<unsigned long int>(tv.tv_usec); in Random()
/foundation/communication/bluetooth_service/services/bluetooth/stack/src/btm/
H A Dbtm_snoop.c114 struct timeval tv; in BtmSnoopOutput() local
115 gettimeofday(&tv, NULL); in BtmSnoopOutput()
117 const uint64_t timestamp = MICROSECOND_1970BASE + tv.tv_sec * MICROSECOND + tv.tv_usec; in BtmSnoopOutput()
/foundation/graphic/graphic_2d/rosen/modules/render_service_client/test/
H A Dsnapshot_surface.cpp56 timeval tv; in GenerateFileName() local
59 if (gettimeofday(&tv, nullptr) == 0) { in GenerateFileName()
60 struct tm *tmVal = localtime(&tv.tv_sec); in GenerateFileName()
/foundation/communication/dsoftbus/adapter/common/kernel/posix/
H A Dsoftbus_adapter_socket.c322 struct timeval tv = { 0 }; in SoftBusSocketSelect() local
324 tv.tv_sec = timeout->sec; in SoftBusSocketSelect()
325 tv.tv_usec = timeout->usec; in SoftBusSocketSelect()
326 timeoutPtr = &tv; in SoftBusSocketSelect()
330 tv.tv_sec = 0; in SoftBusSocketSelect()
331 tv.tv_usec = SELECT_INTERVAL_US; in SoftBusSocketSelect()
332 timeoutPtr = &tv; in SoftBusSocketSelect()
/foundation/communication/bluetooth_service/services/bluetooth/service/src/gavdp/
H A Da2dp_codec_thread.cpp93 struct timeval tv = {}; in ProcessMessage() local
95 gettimeofday(&tv, &tz); in ProcessMessage()
105 encoder_->SendFrames(tv.tv_usec); in ProcessMessage()
/foundation/graphic/graphic_2d/frameworks/opengl_wrapper/test/
H A Dopengl_wrapper_native_test.cpp163 struct timeval tv; in render() local
166 gettimeofday(&tv, nullptr); in render()
168 timeMs = tv.tv_sec * timeConversionRate + tv.tv_usec / timeConversionRate; in render()
/foundation/multimodalinput/input/test/facility/virtual_device/src/
H A Dv_input_device.cpp109 struct timeval tv; in SendEvent() member
110 if (gettimeofday(&tv, nullptr) != 0) { in SendEvent()
114 event.input_event_sec = tv.tv_sec; in SendEvent()
115 event.input_event_usec = tv.tv_usec; in SendEvent()

Completed in 11 milliseconds

123