AuroraRuntime/Source/IO/IOProcessorTimers.cpp

27 lines
690 B
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IOProcessorTimers.cpp
Date: 2022-6-6
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "IOProcessorTimers.hpp"
#include "IOProcessor.hpp"
namespace Aurora::IO
{
bool IOProcessorTimers::Init(IOProcessor *parent, AuSPtr<AuLoop::ITimer> lsTicker)
{
this->parent = parent;
this->lsTicker = lsTicker;
return bool(this->parent) && bool(lsTicker);
}
bool IOProcessorTimers::OnFinished(const AuSPtr<AuLoop::ILoopSource> &source)
{
this->parent->ManualTick();
return false;
}
}