pica/taskmanager/record.h

27 lines
545 B
C
Raw Normal View History

//SPDX-FileCopyrightText: 2024 Yury Gubich <blue@macaw.me>
//SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <cstdint>
#include <chrono>
#include <functional>
namespace TM {
class Record {
public:
using Time = std::chrono::time_point<std::chrono::steady_clock>;
using Task = std::function<void()>;
using ID = uint64_t;
Record(ID id, const Task& task, Time time);
ID id;
Task task;
Time time;
bool operator > (const Record& other) const;
bool operator < (const Record& other) const;
};
}