/foundation/multimedia/media_lite/services/player_lite/impl/player_control/player/fsm/src/ |
D | fsm_common.cpp | 29 struct timespec ts = { 0, 0 }; in FsmGetCurTimeUs() local 31 (void)clock_gettime(CLOCK_MONOTONIC, &ts); in FsmGetCurTimeUs() 33 uint64_t curT = (((uint64_t)ts.tv_sec) * SEC2USEC) + (((uint64_t)ts.tv_nsec) / USEC2NSEC); in FsmGetCurTimeUs() 53 struct timespec ts = { 0, 0 }; in FsmCondTimewait() local 56 (void)clock_gettime(CLOCK_MONOTONIC, &ts); in FsmCondTimewait() 58 ts.tv_sec = 0; in FsmCondTimewait() 59 ts.tv_nsec = 0; in FsmCondTimewait() 65 ts.tv_sec += (delayNs / SEC2NSEC); in FsmCondTimewait() 68 if (ts.tv_nsec + delayNs > SEC2NSEC) { in FsmCondTimewait() 69 ts.tv_sec++; in FsmCondTimewait() [all …]
|
/foundation/communication/dsoftbus/components/nstackx/nstackx_util/platform/unix/ |
D | sys_timer.c | 94 struct itimerspec ts; in TimerSetTimeout() local 101 (void)memset_s(&ts, sizeof(ts), 0, sizeof(ts)); in TimerSetTimeout() 103 ts.it_value.tv_sec = timeoutMs / NSTACKX_MILLI_TICKS; in TimerSetTimeout() 104 ts.it_value.tv_nsec = (timeoutMs % NSTACKX_MILLI_TICKS) * NSTACKX_NANO_SEC_PER_MILLI_SEC; in TimerSetTimeout() 106 ts.it_interval.tv_sec = ts.it_value.tv_sec; in TimerSetTimeout() 107 ts.it_interval.tv_nsec = ts.it_value.tv_nsec; in TimerSetTimeout() 114 if (timerfd_settime(timer->task.taskfd, 0, &ts, NULL) < 0) { in TimerSetTimeout()
|
/foundation/resourceschedule/background_task_mgr/services/transient_task/src/ |
D | time_provider.cpp | 22 struct timespec ts; in GetCurrentTime() local 23 clock_gettime(type, &ts); in GetCurrentTime() 24 …return ((static_cast<int64_t>(ts.tv_sec) * MSEC_PER_SEC) + (static_cast<int64_t>(ts.tv_nsec) / NSE… in GetCurrentTime()
|
/foundation/communication/dsoftbus/components/nstackx_mini/nstackx_util/platform/liteos/ |
D | sys_timer.c | 92 struct itimerspec ts; in TimerSetTimeout() local 99 (void)memset_s(&ts, sizeof(ts), 0, sizeof(ts)); in TimerSetTimeout() 101 ts.it_value.tv_sec = timeoutMs / NSTACKX_MILLI_TICKS; in TimerSetTimeout() 102 ts.it_value.tv_nsec = (timeoutMs % NSTACKX_MILLI_TICKS) * NSTACKX_NANO_SEC_PER_MILLI_SEC; in TimerSetTimeout() 104 ts.it_interval.tv_sec = ts.it_value.tv_sec; in TimerSetTimeout() 105 ts.it_interval.tv_nsec = ts.it_value.tv_nsec; in TimerSetTimeout() 112 if (timer_settime(TASKFD_TO_TIMERID(timer->task.taskfd), 0, &ts, NULL) < 0) { in TimerSetTimeout()
|
/foundation/communication/dsoftbus/components/nstackx/nstackx_util/platform/liteos/ |
D | sys_timer.c | 90 struct itimerspec ts; in TimerSetTimeout() local 97 (void)memset_s(&ts, sizeof(ts), 0, sizeof(ts)); in TimerSetTimeout() 99 ts.it_value.tv_sec = timeoutMs / NSTACKX_MILLI_TICKS; in TimerSetTimeout() 100 ts.it_value.tv_nsec = (timeoutMs % NSTACKX_MILLI_TICKS) * NSTACKX_NANO_SEC_PER_MILLI_SEC; in TimerSetTimeout() 102 ts.it_interval.tv_sec = ts.it_value.tv_sec; in TimerSetTimeout() 103 ts.it_interval.tv_nsec = ts.it_value.tv_nsec; in TimerSetTimeout() 110 if (timer_settime(TASKFD_TO_TIMERID(timer->task.taskfd), 0, &ts, NULL) < 0) { in TimerSetTimeout()
|
/foundation/ace/ace_engine/frameworks/base/utils/ |
D | time_util.cpp | 45 struct timespec ts; in GetMicroTickCount() local 46 clock_gettime(CLOCK_MONOTONIC, &ts); in GetMicroTickCount() 47 return (ts.tv_sec * SEC_TO_MICROSEC + ts.tv_nsec / MICROSEC_TO_NANOSEC); in GetMicroTickCount() 52 struct timespec ts; in GetSysTimestamp() local 53 clock_gettime(CLOCK_MONOTONIC, &ts); in GetSysTimestamp() 54 return ts.tv_sec * SEC_TO_NANOSEC + ts.tv_nsec; in GetSysTimestamp()
|
/foundation/distributedschedule/samgr_lite/samgr/adapter/posix/ |
D | time_adapter.c | 40 struct timespec ts = {0, 0}; in SAMGR_GetProcessTime() local 41 clock_gettime(CLOCK_REALTIME, &ts); in SAMGR_GetProcessTime() 42 return ((ts.tv_sec * MS_PER_SECOND) + (ts.tv_nsec / NS_PER_MS)); in SAMGR_GetProcessTime()
|
/foundation/aafwk/standard/services/formmgr/src/ |
D | form_util.cpp | 139 struct timespec ts; in GetCurrentNanosecond() local 140 ts.tv_sec = 0; in GetCurrentNanosecond() 141 ts.tv_nsec = 0; in GetCurrentNanosecond() 142 clock_gettime(CLOCK_REALTIME, &ts); in GetCurrentNanosecond() 143 return (ts.tv_sec * SEC_TO_NANOSEC + ts.tv_nsec); in GetCurrentNanosecond() 151 struct timespec ts; in GetCurrentMillisecond() local 152 clock_gettime(CLOCK_REALTIME, &ts); in GetCurrentMillisecond() 153 return (ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC); in GetCurrentMillisecond()
|
/foundation/aafwk/standard/test/resource/formsystemtestability/formSystemTestServiceC/src/ |
D | form_st_service_ability_C.cpp | 311 struct timespec ts; in OnUpdate() local 312 clock_gettime(CLOCK_REALTIME, &ts); in OnUpdate() 313 long currentTime = ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in OnUpdate() 324 struct timespec ts; in OnTriggerEvent() local 325 clock_gettime(CLOCK_REALTIME, &ts); in OnTriggerEvent() 326 long currentTime = ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in OnTriggerEvent() 337 struct timespec ts; in OnDelete() local 338 clock_gettime(CLOCK_REALTIME, &ts); in OnDelete() 339 long currentTime = ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in OnDelete() 350 struct timespec ts; in OnCastTemptoNormal() local [all …]
|
/foundation/aafwk/standard/test/resource/formsystemtestability/formSystemTestServiceD/src/ |
D | form_st_service_ability_D.cpp | 311 struct timespec ts; in OnUpdate() local 312 clock_gettime(CLOCK_REALTIME, &ts); in OnUpdate() 313 long currentTime = ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in OnUpdate() 324 struct timespec ts; in OnTriggerEvent() local 325 clock_gettime(CLOCK_REALTIME, &ts); in OnTriggerEvent() 326 long currentTime = ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in OnTriggerEvent() 337 struct timespec ts; in OnDelete() local 338 clock_gettime(CLOCK_REALTIME, &ts); in OnDelete() 339 long currentTime = ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in OnDelete() 350 struct timespec ts; in OnCastTemptoNormal() local [all …]
|
/foundation/aafwk/standard/test/resource/formsystemtestability/formSystemTestServiceE/src/ |
D | form_st_service_ability_E.cpp | 311 struct timespec ts; in OnUpdate() local 312 clock_gettime(CLOCK_REALTIME, &ts); in OnUpdate() 313 long currentTime = ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in OnUpdate() 324 struct timespec ts; in OnTriggerEvent() local 325 clock_gettime(CLOCK_REALTIME, &ts); in OnTriggerEvent() 326 long currentTime = ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in OnTriggerEvent() 337 struct timespec ts; in OnDelete() local 338 clock_gettime(CLOCK_REALTIME, &ts); in OnDelete() 339 long currentTime = ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in OnDelete() 350 struct timespec ts; in OnCastTemptoNormal() local [all …]
|
/foundation/aafwk/standard/test/resource/formsystemtestability/formSystemTestServiceA/src/ |
D | form_st_service_ability_A.cpp | 312 struct timespec ts; in OnUpdate() local 313 clock_gettime(CLOCK_REALTIME, &ts); in OnUpdate() 314 long currentTime = ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in OnUpdate() 325 struct timespec ts; in OnTriggerEvent() local 326 clock_gettime(CLOCK_REALTIME, &ts); in OnTriggerEvent() 327 long currentTime = ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in OnTriggerEvent() 338 struct timespec ts; in OnDelete() local 339 clock_gettime(CLOCK_REALTIME, &ts); in OnDelete() 340 long currentTime = ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in OnDelete() 352 struct timespec ts; in OnCastTemptoNormal() local [all …]
|
/foundation/distributedhardware/devicemanager/ext/mini/services/devicemanagerservice/src/ability/lite/ |
D | dm_ability_manager.cpp | 42 struct timespec ts; in waitForTimeout() local 43 clock_gettime(CLOCK_REALTIME, &ts); in waitForTimeout() 44 ts.tv_sec += (int32_t)timeout_s; in waitForTimeout() 45 sem_timedwait(&mSem_, &ts); in waitForTimeout()
|
/foundation/multimedia/media_lite/services/player_lite/impl/player_control/player/ |
D | liteplayer_comm.cpp | 42 struct timespec ts = { 0, 0 }; in PlayerControlGetCurRelativeTime() local 43 (void)clock_gettime(CLOCK_MONOTONIC, &ts); in PlayerControlGetCurRelativeTime() 44 …uint64_t curTime = ((uint64_t)ts.tv_sec) * AV_SEC2MS_SCALE + ((uint64_t)ts.tv_nsec) / AV_NS2MS_SCA… in PlayerControlGetCurRelativeTime()
|
/foundation/aafwk/standard/services/abilitymgr/test/unittest/phone/lifecycle_test/ |
D | lifecycle_test_base.h | 89 struct timespec ts = {0, 0}; in SemTimedWaitMillis() local 90 clock_gettime(CLOCK_REALTIME, &ts); in SemTimedWaitMillis() 91 msecs = msecs * MILLISECONDS * MILLISECONDS + ts.tv_nsec; in SemTimedWaitMillis() 93 ts.tv_sec += (add + secs); in SemTimedWaitMillis() 94 ts.tv_nsec = msecs % NANOSECONDS; in SemTimedWaitMillis() 95 return sem_timedwait(&sem, &ts); in SemTimedWaitMillis()
|
/foundation/aafwk/standard/test/resource/formsystemtestability/formSystemTestServiceB/src/ |
D | form_st_service_ability_B.cpp | 315 struct timespec ts; in OnUpdate() local 316 clock_gettime(CLOCK_REALTIME, &ts); in OnUpdate() 317 long currentTime = ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in OnUpdate() 328 struct timespec ts; in OnTriggerEvent() local 329 clock_gettime(CLOCK_REALTIME, &ts); in OnTriggerEvent() 330 long currentTime = ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in OnTriggerEvent() 341 struct timespec ts; in OnDelete() local 342 clock_gettime(CLOCK_REALTIME, &ts); in OnDelete() 343 long currentTime = ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in OnDelete() 354 struct timespec ts; in OnCastTemptoNormal() local [all …]
|
/foundation/distributedhardware/devicemanager/ext/mini/services/devicemanagerservice/src/ability/standard/ |
D | dm_ability_manager.cpp | 85 struct timespec ts; in waitForTimeout() local 86 clock_gettime(CLOCK_REALTIME, &ts); in waitForTimeout() 87 ts.tv_sec += (int32_t)timeout_s; in waitForTimeout() 88 sem_timedwait(&mSem_, &ts); in waitForTimeout()
|
/foundation/communication/netstack/ |
D | .gitignore | 4 @ohos.net.connection.d.ts 5 basic.d.ts
|
/foundation/communication/netmanager_base/ |
D | .gitignore | 3 @ohos.net.http.d.ts 4 @ohos.net.socket.d.ts
|
/foundation/communication/bluetooth/services/bluetooth_standard/service/src/common/ |
D | power_device.cpp | 310 struct timespec ts = {}; in Start() local 311 clock_gettime(CLOCK_BOOTTIME, &ts); in Start() 312 deadLineMs_ = ts.tv_sec * MS_PER_SECOND + ts.tv_nsec / NS_PER_MS + ms; in Start() 324 struct timespec ts = {}; in GetRemainMs() local 325 clock_gettime(CLOCK_BOOTTIME, &ts); in GetRemainMs() 326 uint64_t presentMs = ts.tv_sec * MS_PER_SECOND + ts.tv_nsec / NS_PER_MS; in GetRemainMs()
|
/foundation/multimodalinput/input/frameworks/proxy/events/src/ |
D | input_event.cpp | 43 struct timespec ts = { 0, 0 }; in Reset() local 44 if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) { in Reset() 49 uint64_t nowTime = (ts.tv_sec * static_cast<uint64_t>(1e3)) + (ts.tv_nsec / conversionStep); in Reset()
|
/foundation/ace/ace_engine/frameworks/bridge/declarative_frontend/state_mgmt/ |
D | README.md | 33 `./src/lib*.ts` - implementation 34 `./src/index.ts` - implementation 'main' creates singletons.
|
/foundation/communication/dsoftbus/components/nstackx/nstackx_core/dfile/core/ |
D | nstackx_dfile_transfer.c | 131 static inline uint32_t GetElapseTime(const struct timespec *ts) in GetElapseTime() argument 135 return GetTimeDiffMs(&now, ts); in GetElapseTime() 474 ClockGetTime(CLOCK_MONOTONIC, &dFileTrans->ts); in WaitForFileHeaderConfirmPrepare() 490 if (GetElapseTime(&dFileTrans->ts) >= dFileTrans->timeout) { in WaitForFileHeaderConfirm() 503 ClockGetTime(CLOCK_MONOTONIC, &dFileTrans->ts); in SendFileBlockPrepare() 514 if (GetElapseTime(&dFileTrans->ts) >= dFileTrans->timeout) { in SendFileDataOngoing() 530 ClockGetTime(CLOCK_MONOTONIC, &dFileTrans->ts); in SendFileDataOngoing() 541 ClockGetTime(CLOCK_MONOTONIC, &dFileTrans->ts); in WaitForFileTransferDonePrepare() 551 if (GetElapseTime(&dFileTrans->ts) >= dFileTrans->timeout) { in WaitForFileTransferDoneFrame() 684 ClockGetTime(CLOCK_MONOTONIC, &dFileTrans->ts); in ReceiveFileHeaderPrepare() [all …]
|
/foundation/multimedia/media_lite/services/player_lite/impl/player_control/sink/ |
D | player_video_sink.cpp | 50 struct timeval ts; in GetCurTimeUs() local 51 ts.tv_sec = 0; in GetCurTimeUs() 52 ts.tv_usec = 0; in GetCurTimeUs() 53 gettimeofday(&ts, nullptr); in GetCurTimeUs() 54 return (((int64_t)ts.tv_sec) * SS2US) + ((int64_t)ts.tv_usec); in GetCurTimeUs()
|
/foundation/aafwk/aafwk_lite/services/abilitymgr_lite/unittest/utils/ |
D | ability_test_helper.cpp | 252 struct timespec ts = {}; in SemWait() local 253 clock_gettime(CLOCK_REALTIME, &ts); in SemWait() 254 ts.tv_sec += WAIT_TIMEOUT; in SemWait() 255 sem_timedwait(&g_sem, &ts); in SemWait()
|