#include "perfetto/ext/base/periodic_task.h"
#include <limits>
#include "perfetto/base/build_config.h"
#include "perfetto/base/logging.h"
#include "perfetto/base/task_runner.h"
#include "perfetto/base/time.h"
#include "perfetto/ext/base/file_utils.h"
#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
(PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) && __ANDROID_API__ >= 19)
#include <sys/timerfd.h>
#endif
namespace perfetto {
namespace base {
namespace {
uint32_t GetNextDelayMs(const TimeMillis& now_ms,
const PeriodicTask::Args& args) { … }
ScopedPlatformHandle CreateTimerFd(const PeriodicTask::Args& args) { … }
}
PeriodicTask::PeriodicTask(TaskRunner* task_runner)
: … { … }
PeriodicTask::~PeriodicTask() { … }
void PeriodicTask::Start(Args args) { … }
void PeriodicTask::PostNextTask() { … }
void PeriodicTask::RunTaskAndPostNext(WeakPtr<PeriodicTask> thiz,
uint32_t generation) { … }
void PeriodicTask::Reset() { … }
void PeriodicTask::ResetTimerFd() { … }
}
}