2022-06-11 23:01:27 +00:00
|
|
|
/***
|
|
|
|
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
|
|
|
|
{
|
2022-06-11 23:52:46 +00:00
|
|
|
bool IOProcessorTimers::Init(IOProcessor *parent, AuSPtr<AuLoop::ITimer> lsTicker)
|
2022-06-11 23:01:27 +00:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|