2022-06-11 23:01:27 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
2022-12-17 20:14:19 +00:00
|
|
|
File: AuIOProcessorTimers.cpp
|
2022-06-11 23:01:27 +00:00
|
|
|
Date: 2022-6-6
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#include <Source/RuntimeInternal.hpp>
|
|
|
|
#include <Aurora/IO/IOExperimental.hpp>
|
2022-12-17 20:14:19 +00:00
|
|
|
#include "AuIOProcessorTimers.hpp"
|
|
|
|
#include "AuIOProcessor.hpp"
|
2022-06-11 23:01:27 +00:00
|
|
|
|
|
|
|
namespace Aurora::IO
|
|
|
|
{
|
2022-08-29 15:46:46 +00:00
|
|
|
bool IOProcessorTimers::Init(IOProcessor *pParent, AuSPtr<AuLoop::ITimer> pLsTicker)
|
2022-06-11 23:01:27 +00:00
|
|
|
{
|
2022-08-29 15:46:46 +00:00
|
|
|
this->pParent = pParent;
|
|
|
|
this->pLsTicker = pLsTicker;
|
|
|
|
return bool(this->pParent) && bool(pLsTicker);
|
2022-06-11 23:01:27 +00:00
|
|
|
}
|
|
|
|
|
2022-08-29 15:46:46 +00:00
|
|
|
bool IOProcessorTimers::OnFinished(const AuSPtr<AuLoop::ILoopSource> &pSource)
|
2022-06-11 23:01:27 +00:00
|
|
|
{
|
2022-08-29 15:46:46 +00:00
|
|
|
this->pParent->ManualTick();
|
2022-06-11 23:01:27 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|