Home
last modified time | relevance | path

Searched refs:ts (Results 1 – 25 of 53) sorted by relevance

123

/foundation/multimedia/media_lite/services/player_lite/impl/player_control/player/fsm/src/
Dfsm_common.cpp29 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/
Dsys_timer.c94 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/
Dtime_provider.cpp22 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/
Dsys_timer.c92 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/
Dsys_timer.c90 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/
Dtime_util.cpp45 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/
Dtime_adapter.c40 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/
Dform_util.cpp139 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/
Dform_st_service_ability_C.cpp311 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/
Dform_st_service_ability_D.cpp311 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/
Dform_st_service_ability_E.cpp311 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/
Dform_st_service_ability_A.cpp312 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/
Ddm_ability_manager.cpp42 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/
Dliteplayer_comm.cpp42 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/
Dlifecycle_test_base.h89 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/
Dform_st_service_ability_B.cpp315 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/
Ddm_ability_manager.cpp85 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.gitignore4 @ohos.net.connection.d.ts
5 basic.d.ts
/foundation/communication/netmanager_base/
D.gitignore3 @ohos.net.http.d.ts
4 @ohos.net.socket.d.ts
/foundation/communication/bluetooth/services/bluetooth_standard/service/src/common/
Dpower_device.cpp310 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/
Dinput_event.cpp43 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/
DREADME.md33 `./src/lib*.ts` - implementation
34 `./src/index.ts` - implementation 'main' creates singletons.
/foundation/communication/dsoftbus/components/nstackx/nstackx_core/dfile/core/
Dnstackx_dfile_transfer.c131 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/
Dplayer_video_sink.cpp50 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/
Dability_test_helper.cpp252 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()

123