mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-24 12:30:17 +00:00
Adds the ability to query a TimedEventLoop for its input clock rate.
This commit is contained in:
parent
ff6e65cca9
commit
6075064400
@ -35,6 +35,10 @@ unsigned int TimedEventLoop::get_cycles_until_next_event() {
|
|||||||
return (unsigned int)std::max(cycles_until_event_, 0);
|
return (unsigned int)std::max(cycles_until_event_, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int TimedEventLoop::get_input_clock_rate() {
|
||||||
|
return input_clock_rate_;
|
||||||
|
}
|
||||||
|
|
||||||
void TimedEventLoop::reset_timer() {
|
void TimedEventLoop::reset_timer() {
|
||||||
subcycles_until_event_.set_zero();
|
subcycles_until_event_.set_zero();
|
||||||
cycles_until_event_ = 0;
|
cycles_until_event_ = 0;
|
||||||
|
@ -54,6 +54,11 @@ namespace Storage {
|
|||||||
*/
|
*/
|
||||||
unsigned int get_cycles_until_next_event();
|
unsigned int get_cycles_until_next_event();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
@returns the input clock rate.
|
||||||
|
*/
|
||||||
|
unsigned int get_input_clock_rate();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/*!
|
/*!
|
||||||
Sets the time interval, as a proportion of a second, until the next event should be triggered.
|
Sets the time interval, as a proportion of a second, until the next event should be triggered.
|
||||||
|
Loading…
Reference in New Issue
Block a user