Home
last modified time | relevance | path

Searched refs:MILLI_TO_BASE (Results 1 – 8 of 8) sorted by relevance

/ohos5.0/commonlibrary/c_utils/base/src/
H A Dtimer_event_handler.cpp28 static const int MILLI_TO_BASE = 1000; variable
30 constexpr int MILLI_TO_NANO = NANO_TO_BASE / MILLI_TO_BASE;
61 newValue.it_value.tv_sec = now.tv_sec + interval_ / MILLI_TO_BASE; in Initialize()
62 newValue.it_value.tv_nsec = now.tv_nsec + (interval_ % MILLI_TO_BASE) * MILLI_TO_NANO; in Initialize()
74 newValue.it_interval.tv_sec = interval_ / MILLI_TO_BASE; in Initialize()
75 newValue.it_interval.tv_nsec = (interval_ % MILLI_TO_BASE) * MILLI_TO_NANO; in Initialize()
/ohos5.0/base/time/time_service/test/unittest/js_test/permission/
H A DSystemDateTimeGet.test.js21 const MILLI_TO_BASE = 1000;
23 const NANO_TO_MILLI = NANO_TO_BASE / MILLI_TO_BASE;
182 expect(typeof (data) === 'number' && (data / MILLI_TO_BASE) > 0).assertTrue();
220 expect(typeof (data) === 'number' && (data / MILLI_TO_BASE) > 0).assertTrue();
259 expect((data / MILLI_TO_BASE) > 0).assertTrue();
298 expect(typeof (data) === 'number' && (data / MILLI_TO_BASE) > 0).assertTrue();
376 expect((data / MILLI_TO_BASE) > 0).assertTrue();
667 expect(typeof (time) === 'number' && time / MILLI_TO_BASE > 0).assertTrue();
685 expect(typeof (time) === 'number' && time / MILLI_TO_BASE > 0).assertTrue();
721 expect(typeof (time) === 'number' && time / MILLI_TO_BASE > 0).assertTrue();
[all …]
H A DSystemTimeGet.test.js21 const MILLI_TO_BASE = 1000;
23 const NANO_TO_MILLI = NANO_TO_BASE / MILLI_TO_BASE;
155 expect(typeof (milliTime) === 'number' && milliTime / MILLI_TO_BASE > 0).assertTrue();
174 expect(typeof (data) === 'number' && (data / MILLI_TO_BASE) > 0).assertTrue();
191 expect(typeof (milliTime) === 'number' && milliTime / MILLI_TO_BASE > 0).assertTrue();
210 expect(typeof (data) === 'number' && (data / MILLI_TO_BASE) > 0).assertTrue();
247 expect((data / MILLI_TO_BASE) > 0).assertTrue();
284 expect(typeof (data) === 'number' && (data / MILLI_TO_BASE) > 0).assertTrue();
302 expect(typeof (milliTime) === 'number' && milliTime / MILLI_TO_BASE > 0).assertTrue();
321 expect(typeof (data) === 'number' && (data / MILLI_TO_BASE) > 0).assertTrue();
[all …]
/ohos5.0/base/telephony/core_service/services/network_search/src/
H A Dnitz_update.cpp42 const int32_t MILLI_TO_BASE = 1000; variable
79 if ((now / MILLI_TO_BASE - lastSystemTime_) < MAX_UPDATE_TIME) { in ProcessNitzUpdate()
221 currentSystemTime = currentSystemTime / MILLI_TO_BASE; in IsValidTime()
332 …esult = OHOS::MiscServices::TimeServiceClient::GetInstance()->SetTime(networkTime * MILLI_TO_BASE); in SaveTime()
412 time = time / MILLI_TO_BASE; in AutoTimeChange()
/ohos5.0/commonlibrary/c_utils/base/test/unittest/common/
H A Dutils_event_test.cpp59 static const int MILLI_TO_BASE = 1000; variable
61 static constexpr int MILLI_TO_NANO = NANO_TO_BASE / MILLI_TO_BASE;
267 newValue.it_value.tv_sec = now.tv_sec + interval / MILLI_TO_BASE; in Initialize()
268 newValue.it_value.tv_nsec = now.tv_nsec + (interval % MILLI_TO_BASE) * MILLI_TO_NANO; in Initialize()
275 newValue.it_interval.tv_sec = interval / MILLI_TO_BASE; in Initialize()
276 newValue.it_interval.tv_nsec = (interval % MILLI_TO_BASE) * MILLI_TO_NANO; in Initialize()
841 newValue.it_value.tv_sec = now.tv_sec + interval_ / MILLI_TO_BASE; in Initialize()
842 newValue.it_value.tv_nsec = now.tv_nsec + (interval_ % MILLI_TO_BASE) * MILLI_TO_NANO; in Initialize()
854 newValue.it_interval.tv_sec = interval_ / MILLI_TO_BASE; in Initialize()
855 newValue.it_interval.tv_nsec = (interval_ % MILLI_TO_BASE) * MILLI_TO_NANO; in Initialize()
/ohos5.0/commonlibrary/c_utils/base/test/benchmarktest/event_benchmark_test/
H A Devent_benchmark_test.cpp74 static const int MILLI_TO_BASE = 1000; variable
76 static constexpr int MILLI_TO_NANO = NANO_TO_BASE / MILLI_TO_BASE;
369 newValue.it_value.tv_sec = now.tv_sec + interval / MILLI_TO_BASE; in Initialize()
370 newValue.it_value.tv_nsec = now.tv_nsec + (interval % MILLI_TO_BASE) * MILLI_TO_NANO; in Initialize()
377 newValue.it_interval.tv_sec = interval / MILLI_TO_BASE; in Initialize()
378 newValue.it_interval.tv_nsec = (interval % MILLI_TO_BASE) * MILLI_TO_NANO; in Initialize()
985 newValue.it_value.tv_sec = now.tv_sec + interval_ / MILLI_TO_BASE; in Initialize()
986 newValue.it_value.tv_nsec = now.tv_nsec + (interval_ % MILLI_TO_BASE) * MILLI_TO_NANO; in Initialize()
998 newValue.it_interval.tv_sec = interval_ / MILLI_TO_BASE; in Initialize()
999 newValue.it_interval.tv_nsec = (interval_ % MILLI_TO_BASE) * MILLI_TO_NANO; in Initialize()
/ohos5.0/base/time/time_service/services/
H A Dtime_system_ability.cpp56 static const int MILLI_TO_BASE = 1000LL; variable
65 constexpr int32_t MILLI_TO_MICR = MICR_TO_BASE / MILLI_TO_BASE;
66 constexpr int32_t NANO_TO_MILLI = NANO_TO_BASE / MILLI_TO_BASE;
409 if (time / MILLI_TO_BASE > LONG_MAX) { in IsValidTime()
444 tv.tv_sec = (time_t)(time / MILLI_TO_BASE); in SetRealTime()
445 tv.tv_usec = (suseconds_t)((time % MILLI_TO_BASE) * MILLI_TO_MICR); in SetRealTime()
720 time = tv.tv_sec * MILLI_TO_BASE + tv.tv_nsec / NANO_TO_MILLI; in GetThreadTimeMs()
/ohos5.0/base/telephony/core_service/services/network_search/test/
H A Dtest.cpp555 static const int32_t MILLI_TO_BASE = 1000; in TestInitTimeAndTimeZone() local
567 … bool result = OHOS::MiscServices::TimeServiceClient::GetInstance()->SetTime(time * MILLI_TO_BASE); in TestInitTimeAndTimeZone()