From 59ecafe8cf7ac89e313d82d08a9f5da48007f581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Betto?= <niccolo.betto@skywarder.eu> Date: Sat, 1 Jun 2024 15:45:35 +0200 Subject: [PATCH] [TaskScheduler] Use `uint64_t` fixed size length type --- src/shared/drivers/timer/TimestampTimer.cpp | 4 ++-- src/shared/drivers/timer/TimestampTimer.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/shared/drivers/timer/TimestampTimer.cpp b/src/shared/drivers/timer/TimestampTimer.cpp index 2bd519efd..2eadc2650 100644 --- a/src/shared/drivers/timer/TimestampTimer.cpp +++ b/src/shared/drivers/timer/TimestampTimer.cpp @@ -29,9 +29,9 @@ namespace Boardcore { namespace TimestampTimer { -unsigned long long getTimestamp() +uint64_t getTimestamp() { - return static_cast<unsigned long long>(nsToUs(miosix::getTime())); + return static_cast<uint64_t>(nsToUs(miosix::getTime())); } } // namespace TimestampTimer } // namespace Boardcore diff --git a/src/shared/drivers/timer/TimestampTimer.h b/src/shared/drivers/timer/TimestampTimer.h index eef81b209..13fa2ed1f 100644 --- a/src/shared/drivers/timer/TimestampTimer.h +++ b/src/shared/drivers/timer/TimestampTimer.h @@ -22,6 +22,8 @@ #pragma once +#include <cstdint> + namespace Boardcore { @@ -48,6 +50,6 @@ namespace TimestampTimer * * @return Current timestamp in microseconds. */ -unsigned long long getTimestamp(); +uint64_t getTimestamp(); }; // namespace TimestampTimer } // namespace Boardcore -- GitLab