Add place for the async timer concept

This commit is contained in:
Marko Budiselic 2022-10-08 10:10:24 +02:00
parent 7181e546f5
commit 32facac135
3 changed files with 14 additions and 3 deletions

View File

@ -0,0 +1,12 @@
// Copyright 2022 Memgraph Ltd.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
// License, and you may not use this file except in compliance with the Business Source License.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.
namespace memgraph::utils::timer {}

View File

@ -16,19 +16,18 @@
#include "utils/logging.hpp" #include "utils/logging.hpp"
namespace memgraph::utils { namespace memgraph::utils::timer {
#define SIGTIMER (SIGRTMAX - 2) #define SIGTIMER (SIGRTMAX - 2)
class AsyncTimer { class AsyncTimer {
public: public:
AsyncTimer();
explicit AsyncTimer(double seconds); explicit AsyncTimer(double seconds);
AsyncTimer();
~AsyncTimer(); ~AsyncTimer();
AsyncTimer(AsyncTimer &&other) noexcept; AsyncTimer(AsyncTimer &&other) noexcept;
// NOLINTNEXTLINE (hicpp-noexcept-move) // NOLINTNEXTLINE (hicpp-noexcept-move)
AsyncTimer &operator=(AsyncTimer &&other); AsyncTimer &operator=(AsyncTimer &&other);
AsyncTimer(const AsyncTimer &) = delete; AsyncTimer(const AsyncTimer &) = delete;
AsyncTimer &operator=(const AsyncTimer &) = delete; AsyncTimer &operator=(const AsyncTimer &) = delete;