FreeNOS
Public Member Functions
KernelTimer Class Reference

Provides the timer of the kernel. More...

#include <KernelTimer.h>

Inheritance diagram for KernelTimer:
Timer

Public Member Functions

virtual Result tick ()
 Process timer tick. More...
 
- Public Member Functions inherited from Timer
struct Timer::Info ALIGN (8) Info
 Timer information structure. More...
 
 Timer ()
 Constructor. More...
 
Size getInterrupt () const
 Get timer interrupt number. More...
 
Size getFrequency () const
 Get timer frequency. More...
 
virtual Result setFrequency (Size hertz)
 Set timer frequency. More...
 
virtual Result getCurrent (Info *info, const Size msecOffset=0)
 Get current timer info. More...
 
virtual Result initialize ()
 Initialize the timer. More...
 
virtual Result start ()
 Start the timer. More...
 
virtual Result stop ()
 Stop the timer. More...
 
virtual Result wait (u32 microseconds) const
 Busy wait a number of microseconds. More...
 
bool isExpired (const Info &info) const
 Check if a timer value is expired. More...
 

Additional Inherited Members

- Public Types inherited from Timer
enum  Result { Success, NotFound, IOError, InvalidFrequency }
 Result codes. More...
 
- Data Fields inherited from Timer
enum Timer::Result ALIGN
 
- Protected Attributes inherited from Timer
Size m_ticks
 The current timer ticks. More...
 
Size m_frequency
 Frequency of the Timer. More...
 
Size m_int
 Timer interrupt number. More...
 

Detailed Description

Provides the timer of the kernel.

See also
ProcessCtl

Definition at line 36 of file KernelTimer.h.

Member Function Documentation

◆ tick()

Timer::Result KernelTimer::tick ( )
virtual

Process timer tick.

Should be called on each Timer interrupt to keep the m_info variable synchronized with the actual hardware.

Returns
Result code

Reimplemented from Timer.

Definition at line 23 of file KernelTimer.cpp.

References ERROR, InfoTimer, Timer::IOError, Timer::m_frequency, Timer::m_ticks, ProcessCtl(), SELF, Timer::Success, and API::Success.

Referenced by ARP::lookupAddress(), ARP::sendRequest(), FileSystemClient::waitFile(), and FileSystemServer::waitFileHandler().


The documentation for this class was generated from the following files: