From 3caa622b5fb837db5acbbc6551a195d0f72539e7 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Tue, 2 Apr 2024 08:14:09 -0700 Subject: [PATCH] w4 --- dart/common/Stopwatch.hpp | 10 +++++----- dart/common/Timer.hpp | 4 +++- dart/common/Uri.hpp | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dart/common/Stopwatch.hpp b/dart/common/Stopwatch.hpp index 9e646a1c9a0e7..6c48b5834343f 100644 --- a/dart/common/Stopwatch.hpp +++ b/dart/common/Stopwatch.hpp @@ -119,19 +119,19 @@ class Stopwatch final DART_API void tic(); /// Returns the elapsed time in seconds since the last tic() call. -DART_API double toc(bool print = false); +DART_API [[nodiscard]] double toc(bool print = false); /// Returns the elapsed time in seconds since the last tic() call. -DART_API double tocS(bool print = false); +DART_API [[nodiscard]] double tocS(bool print = false); /// Returns the elapsed time in milliseconds since the last tic() call. -DART_API double tocMS(bool print = false); +DART_API [[nodiscard]] double tocMS(bool print = false); /// Returns the elapsed time in microseconds since the last tic() call. -DART_API double tocUS(bool print = false); +DART_API [[nodiscard]] double tocUS(bool print = false); /// Returns the elapsed time in nanoseconds since the last tic() call. -DART_API double tocNS(bool print = false); +DART_API [[nodiscard]] double tocNS(bool print = false); using StopwatchS = Stopwatch; using StopwatchMS = Stopwatch; diff --git a/dart/common/Timer.hpp b/dart/common/Timer.hpp index 729d5e49ce242..af92844c280f3 100644 --- a/dart/common/Timer.hpp +++ b/dart/common/Timer.hpp @@ -41,6 +41,8 @@ #include #endif +#include + #include namespace dart { @@ -52,7 +54,7 @@ namespace common { /// For measure the time, gettimeofday() api is used /// /// \deprecated Use Stopwatch instead. -class DART_DEPRECATED(6.13) Timer +class DART_API DART_DEPRECATED(6.13) Timer { public: /// \brief Default constructor diff --git a/dart/common/Uri.hpp b/dart/common/Uri.hpp index 25ef64efcc259..975d8b8831f95 100644 --- a/dart/common/Uri.hpp +++ b/dart/common/Uri.hpp @@ -40,7 +40,7 @@ namespace dart { namespace common { -class UriComponent final +class DART_API UriComponent final { public: using value_type = std::string; @@ -85,7 +85,7 @@ class UriComponent final /// ResourceRetreiver classes rewrite URIs to other types of URIs (e.g, resolve /// 'package://' URIs to 'file://' URIs), which is easier to implement if you /// have direct access to the URI components. -struct Uri final +struct DART_API Uri final { /// Scheme, e.g. 'http', 'file', 'package' UriComponent mScheme;