The Pedigree Project
0.1
|
#include <Timer.h>
Public Member Functions | |
virtual size_t | getYear ()=0 |
virtual uint8_t | getMonth ()=0 |
virtual uint8_t | getDayOfMonth ()=0 |
virtual uint8_t | getDayOfWeek ()=0 |
virtual uint8_t | getHour ()=0 |
virtual uint8_t | getMinute ()=0 |
virtual uint8_t | getSecond ()=0 |
virtual uint64_t | getNanosecond ()=0 |
virtual uint64_t | getTickCount ()=0 |
virtual uint64_t | getTickCountNano () |
virtual Time::Timestamp | getUnixTimestamp () |
virtual bool | registerHandler (TimerHandler *handler)=0 |
virtual bool | unregisterHandler (TimerHandler *handler)=0 |
virtual void | addAlarm (class Event *pEvent, size_t alarmSecs, size_t alarmUsecs=0)=0 |
virtual void | removeAlarm (class Event *pEvent)=0 |
virtual size_t | removeAlarm (class Event *pEvent, bool bRetZero)=0 |
virtual void | synchronise (bool tohw=false) |
Synchronises the timer with the hardware. Useful for updating the fields returned by get*, especially if IRQs are not enabled. More... | |
Protected Member Functions | |
Timer () | |
virtual | ~Timer () |
Private Member Functions | |
Timer (const Timer &) | |
Timer & | operator= (const Timer &) |
Timer for the time-keeping
Definition at line 32 of file include/pedigree/kernel/machine/Timer.h.
|
inlineprotected |
The default constructor
Definition at line 104 of file include/pedigree/kernel/machine/Timer.h.
Referenced by ~Timer().
|
inlineprotectedvirtual |
The destructor
Definition at line 108 of file include/pedigree/kernel/machine/Timer.h.
References operator=(), and Timer().
|
private |
The copy-constructor
|
pure virtual |
Dispatches the Event pEvent
to the current thread in alarmSecs
time.
pEvent | Event to dispatch. |
alarmSecs | Number of seconds to wait. |
Implemented in GPTimer, Rtc, and HostedTimer.
Referenced by Semaphore::acquireWithResult(), getTickCountNano(), and TimeoutGuard::TimeoutGuard().
|
pure virtual |
Get the current day of month
Implemented in GPTimer, Rtc, and HostedTimer.
Referenced by getUnixTimestamp().
|
pure virtual |
Get the current day of week
Implemented in GPTimer, Rtc, and HostedTimer.
|
pure virtual |
Get the current hour
Implemented in GPTimer, Rtc, and HostedTimer.
Referenced by getUnixTimestamp().
|
pure virtual |
Get the current minute
Implemented in GPTimer, Rtc, and HostedTimer.
Referenced by getUnixTimestamp().
|
pure virtual |
Get the current month
Implemented in GPTimer, Rtc, and HostedTimer.
Referenced by getUnixTimestamp().
|
pure virtual |
Get the current nanosecond
Implemented in GPTimer, Rtc, and HostedTimer.
Referenced by WaitCleanup::terminated().
|
pure virtual |
Get the current second
Implemented in GPTimer, Rtc, and HostedTimer.
Referenced by getUnixTimestamp().
|
pure virtual |
Get the Tick count (time elapsed since system bootup)
Implemented in GPTimer, Rtc, and HostedTimer.
Referenced by getTickCountNano(), Log::LogEntry::operator<<(), and UptimeFile::writeBytewise().
|
inlinevirtual |
Get the Tick count (time elapsed since system bootup) in nanosconds.
Reimplemented in Rtc, and HostedTimer.
Definition at line 65 of file include/pedigree/kernel/machine/Timer.h.
References addAlarm(), getTickCount(), getUnixTimestamp(), and removeAlarm().
|
virtual |
Get the time in UNIX timestamp form (seconds since Jan 1st, 1970).
Definition at line 23 of file Timer.cc.
References getDayOfMonth(), getHour(), getMinute(), getMonth(), getSecond(), and getYear().
Referenced by getTickCountNano(), and WaitCleanup::terminated().
|
pure virtual |
Get the current year
Implemented in GPTimer, Rtc, and HostedTimer.
Referenced by getUnixTimestamp().
The assignment operator
Referenced by ~Timer().
|
pure virtual |
Removes the event pEvent
from the alarm queue.
pEvent | Event to remove alarm for. |
Implemented in GPTimer, Rtc, and HostedTimer.
Referenced by Semaphore::acquireWithResult(), getTickCountNano(), and TimeoutGuard::~TimeoutGuard().
|
pure virtual |
Removes the event pEvent
from the alarm queue.
pEvent | Event to remove alarm for. |
bRetZero | If true, returns zero rather the time until firing |
Implemented in GPTimer, Rtc, and HostedTimer.
|
inlinevirtual |
Synchronises the timer with the hardware. Useful for updating the fields returned by get*, especially if IRQs are not enabled.
tohw | If true, syncs back to the hardware, instead of from it. |
Reimplemented in Rtc, and HostedTimer.
Definition at line 98 of file include/pedigree/kernel/machine/Timer.h.