Home
last modified time | relevance | path

Searched refs:time (Results 1 – 25 of 421) sorted by relevance

12345678910>>...17

/base/hiviewdfx/hilog/frameworks/libhilog/utils/include/
Dlog_timestamp.h31 timespec time; in LogTimeStamp() local
32 clock_gettime(id, &time); in LogTimeStamp()
33 tv_sec = static_cast<uint32_t>(time.tv_sec); in LogTimeStamp()
34 tv_nsec = static_cast<uint32_t>(time.tv_nsec); in LogTimeStamp()
37 explicit LogTimeStamp(const timespec& time) in LogTimeStamp() argument
38 : tv_sec(static_cast<uint32_t>(time.tv_sec)), in LogTimeStamp()
39 tv_nsec(static_cast<uint32_t>(time.tv_nsec)) {} in LogTimeStamp()
44 bool operator == (const LogTimeStamp& time) const
46 return (tv_sec == time.tv_sec) && (tv_nsec == time.tv_nsec);
49 bool operator != (const LogTimeStamp& time) const
[all …]
/base/account/os_account/frameworks/common/perf_stat/src/
Dperf_stat.cpp36 void PerfStat::SetAccountBindStartTime(int64_t time) in SetAccountBindStartTime() argument
38 accountBindBegin_ = (time > 0) ? time : 0; in SetAccountBindStartTime()
46 void PerfStat::SetAccountBindEndTime(int64_t time) in SetAccountBindEndTime() argument
48 accountBindEnd_ = (time > 0 && time > accountBindBegin_) ? time : accountBindBegin_; in SetAccountBindEndTime()
57 void PerfStat::SetAccountAddStartTime(int64_t time) in SetAccountAddStartTime() argument
59 accountAddBegin_ = (time > 0) ? time : 0; in SetAccountAddStartTime()
67 void PerfStat::SetAccountAddEndTime(int64_t time) in SetAccountAddEndTime() argument
69 accountAddEnd_ = (time > 0 && time > accountAddBegin_) ? time : accountAddBegin_; in SetAccountAddEndTime()
78 void PerfStat::SetAccountDelStartTime(int64_t time) in SetAccountDelStartTime() argument
80 accountDelBegin_ = (time > 0) ? time : 0; in SetAccountDelStartTime()
[all …]
/base/global/resource_management_lite/frameworks/resmgr_lite/include/utils/
Ddate_utils.h33 struct timeval time; in CurrentTimeMillis() local
34 gettimeofday(&time, nullptr); in CurrentTimeMillis()
35 return (time.tv_sec * KILO + time.tv_usec / KILO); in CurrentTimeMillis()
46 struct timeval time; in CurrentTimeUsec() local
47 gettimeofday(&time, nullptr); in CurrentTimeUsec()
48 return (time.tv_sec * MILLION + time.tv_usec); in CurrentTimeUsec()
/base/global/resource_management/frameworks/resmgr/include/utils/
Ddate_utils.h32 struct timeval time; in CurrentTimeMillis() local
33 gettimeofday(&time, nullptr); in CurrentTimeMillis()
34 return (time.tv_sec * KILO + time.tv_usec / KILO); in CurrentTimeMillis()
45 struct timeval time; in CurrentTimeUsec() local
46 gettimeofday(&time, nullptr); in CurrentTimeUsec()
47 return (time.tv_sec * MILLION + time.tv_usec); in CurrentTimeUsec()
/base/time/time_service/interfaces/inner_api/src/
Dtime_service_client.cpp90 bool TimeServiceClient::SetTime(const int64_t time) in SetTime() argument
99 return proxy->SetTime(time) == ERR_OK; in SetTime()
117 int32_t TimeServiceClient::SetTimeV9(const int64_t &time) in SetTimeV9() argument
126 return proxy->SetTime(time, ITimeService::API_VERSION_9); in SetTimeV9()
320 int64_t time; in GetWallTimeMs() local
328 if (proxy->GetWallTimeMs(time) != ERR_OK) { in GetWallTimeMs()
332 TIME_HILOGI(TIME_MODULE_SERVICE, "Result: %{public}" PRId64 "", time); in GetWallTimeMs()
333 return time; in GetWallTimeMs()
336 int32_t TimeServiceClient::GetWallTimeMs(int64_t &time) in GetWallTimeMs() argument
345 if (proxy->GetWallTimeMs(time) != ERR_OK) { in GetWallTimeMs()
[all …]
/base/time/time_service/services/etc/init/
Dtimeservice.cfg5 "mkdir /data/service/el1/public/time 0770 time time",
6 "syncexec /system/bin/chown -R time:time /data/service/el1/public/time",
14 "uid" : "time",
15 "gid" : ["time", "shell", "netsys_socket"],
/base/time/time_service/services/
DBUILD.gn14 import("../time.gni")
21 "time/include",
42 "time/src/itimer_info.cpp",
43 "time/src/net_conn_callback_observer.cpp",
44 "time/src/nitz_subscriber.cpp",
45 "time/src/ntp_trusted_time.cpp",
46 "time/src/ntp_update_time.cpp",
47 "time/src/power_subscriber.cpp",
48 "time/src/simple_timer_info.cpp",
49 "time/src/sntp_client.cpp",
[all …]
/base/global/timezone/
DREADME.md5 The time zone module provides the functions of updating, parsing, compiling, and deploying time zon…
9 The directory structure of the time zone module is as follows:
13 ├── timezone # Code repository of the time zone module
22time zone update tool searches for the latest version of time zone data from the [Internet Assigne…
25 cd tool/update_tool // Go to the directory where the time zone update tool is located.
29 The time zone compilation tool compiles the time zone source data and generates time zone binary da…
32 cd tool/compile_tool // Go to the directory where the time zone compilation tool is located.
/base/powermgr/battery_manager/charger/src/
Dbattery_vibrate.cpp58 void BatteryVibrate::HandlePlayMode(int32_t time) in HandlePlayMode() argument
61 SetDuration(time); in HandlePlayMode()
63 usleep((time + VIBRATE_DELAY_MS) * USEC_TO_MSEC); in HandlePlayMode()
67 void BatteryVibrate::HandleDurationMode(int32_t time) in HandleDurationMode() argument
69 SetDuration(time); in HandleDurationMode()
71 usleep((time + VIBRATE_DELAY_MS) * USEC_TO_MSEC); in HandleDurationMode()
75 void BatteryVibrate::HandleVibration(int32_t time) const in HandleVibration()
80 HandlePlayMode(time); in HandleVibration()
85 HandleDurationMode(time); in HandleVibration()
126 void BatteryVibrate::SetDuration(int32_t time) in SetDuration() argument
[all …]
/base/account/os_account/frameworks/common/perf_stat/include/
Dperf_stat.h30 void SetAccountBindStartTime(int64_t time);
33 void SetAccountBindEndTime(int64_t time);
36 void SetAccountAddStartTime(int64_t time);
39 void SetAccountAddEndTime(int64_t time);
42 void SetAccountDelStartTime(int64_t time);
45 void SetAccountDelEndTime(int64_t time);
48 void SetAccountQueryStartTime(int64_t time);
51 void SetAccountQueryEndTime(int64_t time);
57 void SetAccountStateChangeTime(const std::string &stateStr, int64_t time);
/base/security/access_token/services/accesstokenmanager/test/unittest/cpp/src/
Dpermission_grant_event_test.cpp55 uint64_t time; variable
58 eventHandler.AddEvent(tokenID, permissionName, time);
61 eventHandler.NotifyPermGrantStoreResult(true, time + 1);
77 uint64_t time; variable
80 eventHandler.AddEvent(tokenID, permissionName, time);
83 eventHandler.NotifyPermGrantStoreResult(false, time + 1);
99 uint64_t time; variable
102 eventHandler.AddEvent(tokenID, permissionName, time);
105 eventHandler.NotifyPermGrantStoreResult(true, time - 1);
/base/time/time_service/test/unittest/js_test/permission/
DSystemDateTimeGet.test.js373 systemDateTime.getCurrentTime("true").then((time) => {
416 systemDateTime.getRealActiveTime("true").then((time) => {
459 systemDateTime.getRealTime("true").then((time) => {
541 const time = systemDateTime.getTime(true);
542 console.log('Get current time is ' + time);
543 expect(typeof (time) === 'number' && time >= nowTime).assertTrue();
557 const time = systemDateTime.getTime(false);
558 console.log('Get current time is ' + time);
559 expect(typeof (time) === 'number' && time >= nowTime).assertTrue();
572 const time = systemDateTime.getUptime(systemDateTime.TimeType.STARTUP, false);
[all …]
/base/time/time_service/
DREADME_zh.md14 /base/time/time_service
31time.md)不再维护,推荐使用新模块接口[@ohos.systemDateTime](https://gitee.com/openharmony/docs/blob/master/zh-cn/…
37 | setTime(time : number) : Promise | 设置系统时间(1970-01-01至今毫秒数),Promise方式。…
38 | setTime(time : number, callback : AsyncCallback<boolean>) : void | 设置系统时间(1970-01-01至今毫秒数),callba…
89 // time对应的时间为2021-01-20 02:36:25
90 let time = 1611081385000;
92 systemDateTime.setTime(time).then(() => {
93 console.info(`Succeeded in setting time.`);
95 console.info(`Failed to set time. message: ${error.message}, code: ${error.code}`);
98 console.info(`Failed to set time. message: ${e.message}, code: ${e.code}`);
[all …]
DREADME.md5 The timing and time module provides APIs for managing the system time.
14 /base/time/time_service
19 ├── services # time service realization
34 | setTime(time : number) : Promise<boolean> | Set the system time (1970-01-01 to…
35 | setTime(time : number, callback : AsyncCallback<boolean>) : void | Set the system time (1970-01-0…
36 | setDate(date: Date, callback: AsyncCallback<boolean>): void; | Set the system time (Date format),…
37 | setDate(date: Date): Promise<boolean> | Set system time (Date format), cal…
38 | setTimezone(timezone: string, callback: AsyncCallback<boolean>): void | Set the system time zone,…
39 | setTimezone(timezone: string): Promise<boolean> | Set the system time zone, Promise …
58 … represented as the system startup time timer (the timer start time cannot be later than the curre…
[all …]
/base/hiviewdfx/faultloggerd/test/unittest/services/
Dfaultlogger_pipe_test.cpp48 uint64_t time = OHOS::HiviewDFX::GetTimeMilliSeconds(); variable
50 bool check = ptr->Check(pid, time);
53 ptr->Set(pid, time);
58 time = OHOS::HiviewDFX::GetTimeMilliSeconds();
59 check = ptr->Check(pid, time);
74 uint64_t time = OHOS::HiviewDFX::GetTimeMilliSeconds(); variable
76 ptr->Set(pid, time);
/base/hiviewdfx/hiview/plugins/faultlogger/test/common/
Dfaultlogger_client_test.cpp27 std::string GetFaultLogName(const time_t& time, int32_t id, const std::string& type, const std::str… in GetFaultLogName() argument
32 struct tm* timeInfo = localtime(&time); in GetFaultLogName()
43 FaultLogInfoInner CreateFaultLogInfo(const time_t& time, int32_t id, int32_t type, const std::strin… in CreateFaultLogInfo() argument
46 info.time = time; in CreateFaultLogInfo()
61 bool CheckLogFileExist(const time_t& time, int32_t id, const std::string& type, const std::string& … in CheckLogFileExist() argument
63 auto fileName = GetFaultLogName(time, id, type, module); in CheckLogFileExist()
/base/time/time_service/services/etc/
DBUILD.gn15 import("../../time.gni")
17 ohos_prebuilt_etc("time.para") {
18 source = "${time_service_path}/etc/time.para"
20 subsystem_name = "time"
24 ohos_prebuilt_etc("time.para.dac") {
25 source = "${time_service_path}/etc/time.para.dac"
27 subsystem_name = "time"
/base/powermgr/battery_manager/charger/include/
Dbattery_vibrate.h26 void HandleVibration(int32_t time) const;
28 static void HandlePlayMode(int32_t time);
29 static void HandleDurationMode(int32_t time);
32 static void SetDuration(int32_t time);
/base/telephony/sms_mms/services/sms/gsm/
Dgsm_sms_param_encode.cpp214 int32_t timeZone = timeStamp->time.absolute.timeZone; in EncodeTimePdu()
215 resultValue.push_back(((timeStamp->time.absolute.year % DIGIT_TEN) << HEX_VALUE_04) + in EncodeTimePdu()
216 (timeStamp->time.absolute.year / DIGIT_TEN)); in EncodeTimePdu()
217 resultValue.push_back(((timeStamp->time.absolute.month % DIGIT_TEN) << HEX_VALUE_04) + in EncodeTimePdu()
218 (timeStamp->time.absolute.month / DIGIT_TEN)); in EncodeTimePdu()
220 …((timeStamp->time.absolute.day % DIGIT_TEN) << HEX_VALUE_04) + (timeStamp->time.absolute.day / DIG… in EncodeTimePdu()
221 resultValue.push_back(((timeStamp->time.absolute.hour % DIGIT_TEN) << HEX_VALUE_04) + in EncodeTimePdu()
222 (timeStamp->time.absolute.hour / DIGIT_TEN)); in EncodeTimePdu()
223 resultValue.push_back(((timeStamp->time.absolute.minute % DIGIT_TEN) << HEX_VALUE_04) + in EncodeTimePdu()
224 (timeStamp->time.absolute.minute / DIGIT_TEN)); in EncodeTimePdu()
[all …]
/base/global/i18n_lite/frameworks/i18n/src/
Ddate_time_format_impl.cpp153 const tm time = *tmPtr; in Format() local
154 Format(time, this->fPattern, appendTo, status); in Format()
157 void DateTimeFormatImpl::Format(const struct tm &time, const string &pattern, string &appendTo, in Format() argument
166 Process(time, appendTo, pre, count, status); in Format()
185 Process(time, appendTo, pre, count, status); in Format()
241 void DateTimeFormatImpl::Process(const tm &time, string &appendTo, char pre, uint32_t count, I18nSt… in Process() argument
247 ProcessTime(time, appendTo, pre, count, status); in Process()
252 int32_t standaloneMonth = time.tm_mon; in Process()
263 int32_t month = time.tm_mon; in Process()
274 ProcessWeekDayYear(time, appendTo, pre, count, status); in Process()
[all …]
/base/time/time_service/test/fuzztest/timesettime_fuzzer/
Dtimesettime_fuzzer.cpp30 int64_t time = static_cast<int64_t>(*rawData); in FuzzTimeSetTime() local
32 TimeServiceClient::GetInstance()->SetTime(time); in FuzzTimeSetTime()
33 TimeServiceClient::GetInstance()->SetTime(time, code); in FuzzTimeSetTime()
34 TimeServiceClient::GetInstance()->SetTimeV9(time); in FuzzTimeSetTime()
/base/time/time_service/interfaces/inner_api/include/
Dtime_service_client.h62 TIME_API int32_t SetTimeV9(const int64_t &time);
131 TIME_API int32_t GetWallTimeMs(int64_t &time);
150 TIME_API int32_t GetWallTimeNs(int64_t &time);
169 TIME_API int32_t GetBootTimeMs(int64_t &time);
188 TIME_API int32_t GetBootTimeNs(int64_t &time);
207 TIME_API int32_t GetMonotonicTimeMs(int64_t &time);
226 TIME_API int32_t GetMonotonicTimeNs(int64_t &time);
245 TIME_API int32_t GetThreadTimeMs(int64_t &time);
264 TIME_API int32_t GetThreadTimeNs(int64_t &time);
/base/hiviewdfx/hiview/plugins/faultlogger/service/
Dfaultlog_manager.cpp44 LogStoreEx::LogFileFilter CreateLogFileFilter(time_t time, int32_t id, int32_t faultLogType, const … in CreateLogFileFilter() argument
46 LogStoreEx::LogFileFilter filter = [time, id, faultLogType, module](const LogFile &file) { in CreateLogFileFilter()
48 if (info.time <= time) { in CreateLogFileFilter()
76 int32_t FaultLogManager::CreateTempFaultLogFile(time_t time, int32_t id, int32_t faultType, in CreateTempFaultLogFile() argument
80 info.time = time; in CreateTempFaultLogFile()
94 return lhsInfo.time > rhsInfo.time; in Init()
157 std::list<std::string> FaultLogManager::GetFaultLogFileList(const std::string &module, time_t time,… in GetFaultLogFileList() argument
160 LogStoreEx::LogFileFilter filter = CreateLogFileFilter(time, id, faultType, module); in GetFaultLogFileList()
/base/time/time_service/framework/js/napi/system_date_time/src/
Dnapi_system_date_time.cpp75 int64_t time = 0; in SetTime() member
81 setTimeContext->status = napi_get_value_int64(env, argv[ARGV_FIRST], &setTimeContext->time); in SetTime()
88 auto innerCode = TimeServiceClient::GetInstance()->SetTimeV9(setTimeContext->time); in SetTime()
101 int64_t time = 0; in SetDate() member
110 napi_get_value_int64(env, argv[ARGV_FIRST], &setDateContext->time); in SetDate()
111 …CHECK_ARGS_RETURN_VOID(TIME_MODULE_JS_NAPI, setDateContext, setDateContext->time >= 0, "invalid ti… in SetDate()
126 … setDateContext->status = napi_get_value_int64(env, getTimeResult, &setDateContext->time); in SetDate()
134 auto innerCode = TimeServiceClient::GetInstance()->SetTimeV9(setDateContext->time); in SetDate()
147 int64_t time = 0; in GetRealActiveTime() member
168 … innerCode = TimeServiceClient::GetInstance()->GetMonotonicTimeNs(getRealActiveTimeContext->time); in GetRealActiveTime()
[all …]
/base/powermgr/battery_statistics/services/native/src/entities/
Dwifi_entity.cpp57 int64_t time = StatsUtils::DEFAULT_VALUE; in GetActiveTimeMs() local
59 return time; in GetActiveTimeMs()
62 time = wifiOnTimer_->GetRunningTimeMs(); in GetActiveTimeMs()
63 STATS_HILOGD(COMP_SVC, "Get wifi on time: %{public}" PRId64 "ms", time); in GetActiveTimeMs()
64 return time; in GetActiveTimeMs()
67 return time; in GetActiveTimeMs()
141 int64_t time = GetActiveTimeMs(StatsUtils::STATS_TYPE_WIFI_ON); in DumpInfo() local
145 .append(ToString(time)) in DumpInfo()

12345678910>>...17