Signed-off-by: GlaryCastle <yangpeng190@huawei.com>

Changes to be committed:
	modified:   services/dfx/include/time_cmd_dispatcher.h
	modified:   services/dfx/include/time_cmd_parse.h
	modified:   services/dfx/src/time_cmd_dispatcher.cpp
	modified:   services/time_manager/src/time_service.cpp
This commit is contained in:
GlaryCastle
2022-07-05 13:46:57 +08:00
parent b50681fb66
commit 400c368c4e
4 changed files with 8 additions and 9 deletions
+1 -3
View File
@@ -19,12 +19,10 @@
#include <map>
#include <string>
#include <vector>
#include "time_cmd_parse.h"
namespace OHOS {
namespace MiscServices {
class TimeCmdDispatcher {
public:
static TimeCmdDispatcher &GetInstance();
@@ -37,4 +35,4 @@ private:
};
} // namespace MiscServices
} // namespace OHOS
#endif //TIME_CMD_DISPATCHER_H
#endif // TIME_CMD_DISPATCHER_H
+1 -1
View File
@@ -34,4 +34,4 @@ private:
std::string help;
Action action;
};
#endif //TIME_CMDPARSE_H
#endif // TIME_CMDPARSE_H
+2 -3
View File
@@ -13,15 +13,14 @@
* limitations under the License.
*/
#include "time_cmd_dispatcher.h"
#include <cstdio>
#include <iostream>
#include "time_cmd_dispatcher.h"
#include "time_hilog_wreapper.h"
namespace OHOS {
namespace MiscServices {
bool TimeCmdDispatcher::Dispatch(int fd, const std::vector<std::string> &args)
{
if (args.empty() || args.at(0) == "-h") {
+4 -2
View File
@@ -423,7 +423,8 @@ void TimeService::DumpTimerInfoById(int fd, const std::vector<std::string> &inpu
return;
}
}
timerManagerHandler_->ShowTimerEntryById(fd, std::atoi(input.at(2).c_str()));
int paramNumPos=2;
timerManagerHandler_->ShowTimerEntryById(fd, std::atoi(input.at(paramNumPos).c_str()));
}
void TimeService::DumpTimerTriggerById(int fd, const std::vector<std::string> &input)
@@ -437,7 +438,8 @@ void TimeService::DumpTimerTriggerById(int fd, const std::vector<std::string> &i
return;
}
}
timerManagerHandler_->ShowTimerTriggerById(fd, std::atoi(input.at(2).c_str()));
int paramNumPos=2;
timerManagerHandler_->ShowTimerTriggerById(fd, std::atoi(input.at(paramNumPos).c_str()));
}
int TimeService::set_rtc_time(time_t sec)