Skip to content

Commit

Permalink
Replace usage of <chrono> which isn't available on freestanding
Browse files Browse the repository at this point in the history
implementations anymore
  • Loading branch information
offa committed Dec 19, 2024
1 parent 0794980 commit fe70874
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

#pragma once

#include <chrono>
#include <cstdint>
#include <stm32f4xx_hal.h>

namespace platform
{
void wait(std::chrono::milliseconds t) noexcept;
void wait(std::uint32_t milliseconds) noexcept;
}
4 changes: 2 additions & 2 deletions src/PlatformStm32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

namespace platform
{
void wait(std::chrono::milliseconds t) noexcept
void wait(std::uint32_t milliseconds) noexcept
{
HAL_Delay(t.count());
HAL_Delay(milliseconds);
}

}
4 changes: 2 additions & 2 deletions test/mock/PlatformMock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
namespace platform
{

void wait(std::chrono::milliseconds t) noexcept
void wait(std::uint32_t milliseconds) noexcept
{
mock("platform").actualCall("wait").withParameter("timeMs", static_cast<unsigned int>(t.count()));
mock("platform").actualCall("wait").withParameter("timeMs", static_cast<unsigned int>(milliseconds));
}
}

0 comments on commit fe70874

Please sign in to comment.