mirror of
https://github.com/openharmony/miscservices_time.git
synced 2026-07-18 17:34:34 -04:00
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:
@@ -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
|
||||
@@ -34,4 +34,4 @@ private:
|
||||
std::string help;
|
||||
Action action;
|
||||
};
|
||||
#endif //TIME_CMDPARSE_H
|
||||
#endif // TIME_CMDPARSE_H
|
||||
@@ -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") {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user