mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-10 21:01:49 +00:00
parent
345c01677d
commit
acb6bbb649
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2021 Genode Labs GmbH
|
||||
* Copyright (C) 2021-2022 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
@ -39,8 +39,7 @@ time_t Board::Timer::stime() const
|
||||
|
||||
void Timer::_start_one_shot(time_t const ticks)
|
||||
{
|
||||
_device.last_time = _device.stime();
|
||||
Sbi::set_timer(_device.last_time + ticks);
|
||||
Sbi::set_timer(_time + ticks);
|
||||
}
|
||||
|
||||
|
||||
@ -58,7 +57,7 @@ time_t Timer::_max_value() const {
|
||||
|
||||
time_t Timer::_duration() const
|
||||
{
|
||||
return _device.stime() - _device.last_time;
|
||||
return _device.stime() - _time;
|
||||
}
|
||||
|
||||
|
||||
|
@ -31,8 +31,6 @@ struct Board::Timer
|
||||
TICKS_PER_US = TICKS_PER_MS / 1000,
|
||||
};
|
||||
|
||||
Kernel::time_t last_time { 0 };
|
||||
|
||||
Kernel::time_t stime() const;
|
||||
|
||||
Timer(unsigned);
|
||||
|
Loading…
x
Reference in New Issue
Block a user