0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

modules/console: Add cmd to list the full event horizon.

This commit is contained in:
Jason Volk 2019-06-04 21:42:14 -07:00
parent 475ee3867d
commit baaca77c54

View file

@ -6597,6 +6597,31 @@ console_cmd__event__horizon(opt &out, const string_view &line)
return true;
}
bool
console_cmd__event__horizon__list(opt &out, const string_view &line)
{
const m::event::horizon horizon;
horizon.for_each([&out]
(const auto &event_id, const auto &event_idx)
{
const auto _event_id
{
m::event_id(event_idx, std::nothrow)
};
out << event_id
<< " -> "
<< event_idx
<< " "
<< _event_id
<< std::endl;
return true;
});
return true;
}
bool
console_cmd__event__horizon__flush(opt &out, const string_view &line)
{