mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-10 22:44:30 +00:00
parent
61f59818d3
commit
8d2ee6d040
@ -70,16 +70,9 @@ Duration Timer::Time_source::curr_time()
|
|||||||
{
|
{
|
||||||
uint32_t passed_ticks;
|
uint32_t passed_ticks;
|
||||||
|
|
||||||
/*
|
/* read PIT count and status */
|
||||||
* Read PIT count and status
|
|
||||||
*
|
|
||||||
* Reading the PIT registers via port I/O is a non-const operation.
|
|
||||||
* Since 'curr_time' is declared as const, however, we need to
|
|
||||||
* explicitly override the const-ness of the 'this' pointer.
|
|
||||||
*/
|
|
||||||
bool wrapped;
|
bool wrapped;
|
||||||
uint16_t const curr_counter =
|
uint16_t const curr_counter = _read_counter(&wrapped);
|
||||||
const_cast<Time_source *>(this)->_read_counter(&wrapped);
|
|
||||||
|
|
||||||
/* determine the time since we looked at the counter */
|
/* determine the time since we looked at the counter */
|
||||||
if (wrapped && !_handled_wrap) {
|
if (wrapped && !_handled_wrap) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user