Files
MuditaOS/module-sys/Service/include/Timers/TimerFactory.hpp
Marcin Smoczyński 57874cab33 [BH-912] Improve sys module structure
Improve structure of the module sys. Problems within this module
prevents from linking others.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-09-24 10:01:19 +02:00

30 lines
968 B
C++

// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include <string>
#include "TimerHandle.hpp"
namespace sys
{
class Service; // Forward declaration
} // namespace sys
namespace sys
{
class TimerFactory
{
public:
static TimerHandle createSingleShotTimer(Service *parent,
const std::string &name,
std::chrono::milliseconds interval,
timer::TimerCallback &&callback);
static TimerHandle createPeriodicTimer(Service *parent,
const std::string &name,
std::chrono::milliseconds interval,
timer::TimerCallback &&callback);
};
} // namespace sys