From 4de67f65e6b7e0dc5079700b4c09f2652d56eb33 Mon Sep 17 00:00:00 2001 From: falsycat Date: Mon, 14 Nov 2022 00:40:48 +0900 Subject: [PATCH] add System/Node/Time --- file/system_node.cc | 24 ++++++++++++++++++++---- init.hh | 6 ++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/file/system_node.cc b/file/system_node.cc index 6d461f6..675f261 100644 --- a/file/system_node.cc +++ b/file/system_node.cc @@ -1,8 +1,8 @@ +#include #include #include "nf7.hh" -#include "common/generic_dir.hh" #include "common/generic_type_info.hh" #include "common/node.hh" #include "common/pure_node_file.hh" @@ -19,7 +19,7 @@ class Save final : public nf7::Node::Lambda, static inline nf7::GenericTypeInfo> kType = { "System/Node/Save", {}, }; - static inline const nf7::Node::Meta kMeta = { {"exec"}, {}, }; + static inline const nf7::Node::Meta kMeta = {{"exec"}, {},}; using nf7::Node::Lambda::Lambda; void Handle(const nf7::Node::Lambda::Msg&) noexcept override { @@ -34,7 +34,7 @@ class Exit final : public nf7::Node::Lambda { static inline nf7::GenericTypeInfo> kType = { "System/Node/Exit", {}, }; - static inline const nf7::Node::Meta kMeta = { {"exec"}, {}, }; + static inline const nf7::Node::Meta kMeta = {{"exec"}, {},}; using nf7::Node::Lambda::Lambda; void Handle(const nf7::Node::Lambda::Msg&) noexcept override { @@ -47,7 +47,7 @@ class Panic final : public nf7::Node::Lambda { static inline nf7::GenericTypeInfo> kType = { "System/Node/Panic", {}, }; - static inline const nf7::Node::Meta kMeta = { {"exec"}, {}, }; + static inline const nf7::Node::Meta kMeta = {{"exec"}, {},}; using nf7::Node::Lambda::Lambda; void Handle(const nf7::Node::Lambda::Msg& in) noexcept override { @@ -64,5 +64,21 @@ class Panic final : public nf7::Node::Lambda { } }; +class Time final : public nf7::Node::Lambda, + public std::enable_shared_from_this