/base/powermgr/powermgr_lite/utils/src/ |
H A D | power_mgr_time_util.c | 20 struct timespec ts; in GetCurrentTimeMsec() local 21 clock_gettime(clkId, &ts); in GetCurrentTimeMsec() 22 return SecToMsec(ts.tv_sec) + NsecToMsec(ts.tv_nsec); in GetCurrentTimeMsec()
|
H A D | power_mgr_timer_util.c | 42 static void SetTimeSpec(struct timespec *ts, int64_t msec) in SetTimeSpec() argument 44 ts->tv_sec = MsecToSec(msec); in SetTimeSpec() 45 msec -= SecToMsec(ts->tv_sec); in SetTimeSpec() 46 ts->tv_nsec = MsecToNsec(msec); in SetTimeSpec() 51 struct itimerspec ts; in StartTimer() local 52 SetTimeSpec(&ts.it_value, whenMsec); in StartTimer() 53 SetTimeSpec(&ts.it_interval, intervalMsec); in StartTimer() 54 int32_t ret = timer_settime(timer, 0, &ts, NULL); in StartTimer()
|
/base/security/device_security_level/baselib/utils/src/ |
H A D | utils_datetime.c | 34 struct timespec ts; in GetMillisecondSinceBoot() local 38 clock_gettime(CLOCK_BOOTTIME, &ts); in GetMillisecondSinceBoot() 39 result = (uint64_t)(ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC); in GetMillisecondSinceBoot() 50 struct timespec ts; in GetMillisecondSince1970() local 51 clock_gettime(CLOCK_REALTIME, &ts); in GetMillisecondSince1970() 52 return ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC; in GetMillisecondSince1970()
|
/base/powermgr/power_manager/utils/native/include/ |
H A D | power_time.h | 27 struct timespec ts = { 0, 0}; in GetCurrentRealTimeMs() local 28 if (clock_gettime(CLOCK_REALTIME, &ts) != 0) { in GetCurrentRealTimeMs() 31 return (ts.tv_sec * MS_TO_S + ts.tv_nsec / NS_TO_MS); in GetCurrentRealTimeMs()
|
/base/hiviewdfx/faultloggerd/common/cutil/ |
H A D | dfx_cutil.c | 127 struct timespec ts; in GetTimeMilliseconds() local 128 (void)clock_gettime(CLOCK_REALTIME, &ts); in GetTimeMilliseconds() 129 return ((uint64_t)ts.tv_sec * NUMBER_ONE_THOUSAND) + // 1000 : second to millisecond convert ratio in GetTimeMilliseconds() 130 (((uint64_t)ts.tv_nsec) / NUMBER_ONE_MILLION); // 1000000 : nanosecond to millisecond convert ratio in GetTimeMilliseconds() 158 struct timespec ts; in GetAbsTimeMilliSeconds() local 159 (void)clock_gettime(CLOCK_MONOTONIC, &ts); in GetAbsTimeMilliSeconds() 160 return ((uint64_t)(ts.tv_sec) * NUMBER_ONE_THOUSAND) + in GetAbsTimeMilliSeconds() 161 ((uint64_t)(ts.tv_nsec) / NUMBER_ONE_MILLION); in GetAbsTimeMilliSeconds()
|
H A D | musl_cutil.h | 135 struct timespec ts; in GetTimeMilliseconds() local 136 (void)clock_gettime(CLOCK_REALTIME, &ts); in GetTimeMilliseconds() 137 return ((uint64_t)ts.tv_sec * NUMBER_ONE_THOUSAND) + // 1000 : second to millisecond convert ratio in GetTimeMilliseconds() 138 (((uint64_t)ts.tv_nsec) / NUMBER_ONE_MILLION); // 1000000 : nanosecond to millisecond convert ratio in GetTimeMilliseconds()
|
/base/security/dlp_permission_service/interfaces/inner_api/dlp_fuse/src/ |
H A D | dlp_fuse_fd.c | 32 struct timespec ts; in GetDlpFuseFd() local 33 clock_gettime(CLOCK_REALTIME, &ts); in GetDlpFuseFd() 34 ts.tv_sec += TIME_WAIT_TIME_OUT; in GetDlpFuseFd() 37 pthread_cond_timedwait(&g_cond, &g_mutex, &ts); in GetDlpFuseFd()
|
/base/hiviewdfx/hilog/test/fuzztest/hilogclient_fuzzer/ |
H A D | hilogclient_fuzzer.cpp | 32 struct timespec ts = {0}; in DoSomethingInterestingWithMyAPI() local 33 (void)clock_gettime(CLOCK_REALTIME, &ts); in DoSomethingInterestingWithMyAPI() 36 header.tv_sec = static_cast<uint32_t>(ts.tv_sec); in DoSomethingInterestingWithMyAPI() 37 header.tv_nsec = static_cast<uint32_t>(ts.tv_nsec); in DoSomethingInterestingWithMyAPI()
|
/base/hiviewdfx/hilog/services/hilogd/ |
H A D | kmsg_parser.cpp | 96 struct timespec ts = {0}; in ParseKmsg() local 97 (void)clock_gettime(CLOCK_REALTIME, &ts); in ParseKmsg() 98 msg.tv_sec = static_cast<uint32_t>(ts.tv_sec); in ParseKmsg() 99 msg.tv_nsec = static_cast<uint32_t>(ts.tv_nsec); in ParseKmsg()
|
/base/hiviewdfx/faultloggerd/common/dfxutil/ |
H A D | dfx_util.cpp | 91 struct timespec ts; in GetTimeMilliSeconds() local 92 (void)clock_gettime(CLOCK_REALTIME, &ts); in GetTimeMilliSeconds() 93 return ((uint64_t)ts.tv_sec * NUMBER_ONE_THOUSAND) + // 1000 : second to millisecond convert ratio in GetTimeMilliSeconds() 94 (((uint64_t)ts.tv_nsec) / NUMBER_ONE_MILLION); // 1000000 : nanosecond to millisecond convert ratio in GetTimeMilliSeconds() 99 struct timespec ts; in GetAbsTimeMilliSeconds() local 100 (void)clock_gettime(CLOCK_MONOTONIC, &ts); in GetAbsTimeMilliSeconds() 101 return (static_cast<uint64_t>(ts.tv_sec) * NUMBER_ONE_THOUSAND) + in GetAbsTimeMilliSeconds() 102 (static_cast<uint64_t>(ts.tv_nsec) / NUMBER_ONE_MILLION); in GetAbsTimeMilliSeconds()
|
/base/update/updater/utils/ |
H A D | utils_common.cpp | 64 struct timespec ts = { static_cast<time_t>(seconds), nanoSeconds }; in UsSleep() local 65 while (nanosleep(&ts, &ts) < 0 && errno == EINTR) { in UsSleep()
|
/base/startup/init/interfaces/innerkits/fs_manager/libfs_dm/ |
H A D | fs_dm.c | 108 struct dm_target_spec *ts = NULL; in LoadDmDeviceTable() local 114 parasTotalSize = DM_ALIGN(sizeof(*io) + sizeof(*ts) + target->paras_len + 1); in LoadDmDeviceTable() 122 ts = (struct dm_target_spec *)(parasBuf + sizeof(*io)); in LoadDmDeviceTable() 123 paras = parasBuf + sizeof(*io) + sizeof((*ts)); in LoadDmDeviceTable() 137 ts->status = 0; in LoadDmDeviceTable() 138 ts->sector_start = target->start; in LoadDmDeviceTable() 139 ts->length = target->length; in LoadDmDeviceTable() 141 err = strcpy_s(ts->target_type, sizeof(ts->target_type), targetType); in LoadDmDeviceTable() 155 ts in LoadDmDeviceTable() [all...] |
/base/hiviewdfx/hilog/frameworks/libhilog/base/ |
H A D | hilog_base.c | 55 struct timespec ts = {0};
in SendMessage() local 56 (void)clock_gettime(CLOCK_REALTIME, &ts);
in SendMessage() 59 header->tv_sec = (uint32_t)(ts.tv_sec);
in SendMessage() 60 header->tv_nsec = (uint32_t)(ts.tv_nsec);
in SendMessage()
|
/base/hiviewdfx/faultloggerd/interfaces/innerkits/crash_exception/ |
H A D | crash_exception.cpp | 36 struct timespec ts; in GetTimeMillisec() local 37 (void)clock_gettime(CLOCK_REALTIME, &ts); in GetTimeMillisec() 38 return ((uint64_t)ts.tv_sec * NUMBER_ONE_THOUSAND) + in GetTimeMillisec() 39 (((uint64_t)ts.tv_nsec) / NUMBER_ONE_MILLION); in GetTimeMillisec()
|
/base/startup/init/services/param/liteos/ |
H A D | param_osadp.c | 51 static void SetTimeSpec(struct timespec *ts, int64_t msec)
in SetTimeSpec() argument 53 ts->tv_sec = msec / MSEC_PER_SEC; // 1000LL ms --> m
in SetTimeSpec() 54 ts->tv_nsec = (msec - ts->tv_sec * MSEC_PER_SEC) * NSEC_PER_MSEC;
in SetTimeSpec() 60 struct itimerspec ts;
in StartTimer() local 61 SetTimeSpec(&ts.it_value, whenMsec);
in StartTimer() 62 SetTimeSpec(&ts.it_interval, whenMsec);
in StartTimer() 63 int32_t ret = timer_settime(paramTimer->timerId, 0, &ts, NULL);
in StartTimer()
|
/base/hiviewdfx/hiview/plugins/faultlogger/interfaces/cpp/innerkits/ |
H A D | faultlog_info.cpp | 93 void FaultLogInfo::SetTimeStamp(int64_t ts) in SetTimeStamp() argument 95 ts_ = ts; in SetTimeStamp()
|
/base/hiviewdfx/hiview/base/utility/ |
H A D | time_util.cpp | 150 struct timespec ts; in GetBootTimeMs() local 151 if (clock_gettime(CLOCK_BOOTTIME, &ts) == 0) { in GetBootTimeMs() 152 return static_cast<uint64_t>(ts.tv_sec * SEC_TO_MILLISEC + ts.tv_nsec / MILLISEC_TO_NANOSEC); in GetBootTimeMs()
|
/base/hiviewdfx/hiview/plugins/faultlogger/interfaces/cj/ |
H A D | faultlogger_ffi.cpp | 50 .ts = faultLogInfo->GetTimeStamp(), in ConvertInform() 126 retValue[i].timestamp = infoItem.ts; in FfiFaultLoggerQuery() 132 HIVIEW_LOGI("add element when resovled pid = %{public}d, uid = %{public}d, ts = %{public}" PRId64, in FfiFaultLoggerQuery() 133 infoItem.pid, infoItem.uid, infoItem.ts); in FfiFaultLoggerQuery()
|
H A D | faultlogger_info.h | 35 int64_t ts = 0; member
|
/base/powermgr/battery_manager/charger/src/ |
H A D | charger_graphic_engine.cpp | 89 struct timespec ts = {static_cast<time_t>(seconds), nanoSeconds}; in UsSleep() local 90 while (nanosleep(&ts, &ts) < 0 && errno == EINTR) {} in UsSleep()
|
/base/hiviewdfx/hiview/plugins/usage_event_report/cache/ |
H A D | fold_event_cacher.cpp | 136 appEventRecord.ts = static_cast<int64_t>(TimeUtil::GetBootTimeMs());
in TimeOut() 179 appEventRecord.ts = static_cast<int64_t>(TimeUtil::GetBootTimeMs());
in ProcessForegroundEvent() 199 appEventRecord.ts = static_cast<int64_t>(TimeUtil::GetBootTimeMs());
in ProcessBackgroundEvent() 230 appEventRecord.ts = static_cast<int64_t>(TimeUtil::GetBootTimeMs());
in ProcessSceenStatusChangedEvent() 256 newRecord.ts = static_cast<int64_t>(TimeUtil::GetBootTimeMs());
in ProcessCountDurationEvent() 298 uint64_t duration = (it->ts > preIt->ts) ? static_cast<uint64_t>(it->ts - preIt->ts) : 0;
in CalCulateDuration()
|
/base/hiviewdfx/hilog/frameworks/libhilog/ |
H A D | hilog_printf.cpp | 125 static int HiLogFlowCtrlProcess(int len, const struct timespec &ts) in HiLogFlowCtrlProcess() argument 137 LogTimeStamp tsNow(ts); in HiLogFlowCtrlProcess() 235 struct timespec ts = {0}; in HiLogPrintArgs() local 236 (void)clock_gettime(CLOCK_REALTIME, &ts); in HiLogPrintArgs() 239 header.tv_sec = static_cast<uint32_t>(ts.tv_sec); in HiLogPrintArgs() 240 header.tv_nsec = static_cast<uint32_t>(ts.tv_nsec); in HiLogPrintArgs()
|
/base/sensors/sensor_lite/interfaces/kits/native/test/performance/src/ |
H A D | sensor_lite_test_performance.cpp | 59 struct timespec ts = {0, 0};
in GetCurrentMillSecTime() local 60 clock_gettime(CLOCK_REALTIME, &ts);
in GetCurrentMillSecTime() 61 return (uint64_t)((ts.tv_sec * MS_PER_SECOND) + (ts.tv_nsec / NS_PER_MS));
in GetCurrentMillSecTime()
|
/base/tee/tee_client/frameworks/libteec_vendor/ |
H A D | tee_client_socket.c | 197 struct timespec ts;
in SleepNs() local 198 ts.tv_sec = 0;
in SleepNs() 199 ts.tv_nsec = num;
in SleepNs() 201 if (nanosleep(&ts, NULL) != 0) {
in SleepNs()
|
/base/hiviewdfx/hiview/base/event_store/include/ |
H A D | sys_event_query.h | 43 int64_t ts = 0; member 50 Entry(int64_t id, int64_t ts, std::shared_ptr<EventRaw::RawData> data) in Entry() 51 : id(id), ts(ts), data(data), sysVersion("") {} in Entry() 53 Entry(int64_t id, int64_t ts, std::shared_ptr<EventRaw::RawData> data, std::string& sysVersion) in Entry() 54 : id(id), ts(ts), data(data), sysVersion(sysVersion) {} in Entry()
|