Change C++ WaitCommand to use units (#1865)

Also remove unique_ptr usage.
This commit is contained in:
Peter Johnson
2019-09-02 23:39:51 -07:00
committed by GitHub
parent 1fb3011235
commit 761bc3ef85
10 changed files with 27 additions and 25 deletions

View File

@@ -28,9 +28,9 @@ void Command::Initialize() {}
void Command::Execute() {}
void Command::End(bool interrupted) {}
ParallelRaceGroup Command::WithTimeout(double seconds) && {
ParallelRaceGroup Command::WithTimeout(units::second_t duration) && {
std::vector<std::unique_ptr<Command>> temp;
temp.emplace_back(std::make_unique<WaitCommand>(seconds));
temp.emplace_back(std::make_unique<WaitCommand>(duration));
temp.emplace_back(std::move(*this).TransferOwnership());
return ParallelRaceGroup(std::move(temp));
}