summaryrefslogtreecommitdiff
path: root/Source/Kernel/Devices/Timer.class.h
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-08-22 21:44:32 +0200
committerAlexis211 <alexis211@gmail.com>2009-08-22 21:44:32 +0200
commit2582a11c37ccc22d64974b20b0793e5ba873fe1f (patch)
tree485565c0950f0355290690d3396bcb4c22774fd0 /Source/Kernel/Devices/Timer.class.h
parent74e721676ddd5d996ccf2e1d35da57320f658609 (diff)
downloadMelon-2582a11c37ccc22d64974b20b0793e5ba873fe1f.tar.gz
Melon-2582a11c37ccc22d64974b20b0793e5ba873fe1f.zip
Lots of stuff added : heap, timer, device managment, ...
Diffstat (limited to 'Source/Kernel/Devices/Timer.class.h')
-rw-r--r--Source/Kernel/Devices/Timer.class.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/Source/Kernel/Devices/Timer.class.h b/Source/Kernel/Devices/Timer.class.h
new file mode 100644
index 0000000..187a7e9
--- /dev/null
+++ b/Source/Kernel/Devices/Timer.class.h
@@ -0,0 +1,26 @@
+#ifndef DEF_TIMER_CLASS
+#define DEF_TIMER_CLASS
+
+#include <Devices/Device.proto.h>
+
+class Timer : public Device {
+ private:
+ u8int m_frequency;
+ u8int m_ticks;
+ u32int m_seconds;
+
+ public:
+ Timer(u8int frequency = 100);
+
+ void setFrequency(u8int frequency);
+
+ String getClass();
+ String getName();
+
+ u32int uptime();//Returns seconds since init
+ u32int time(); //Returns miliseconds since init
+
+ void handleIRQ(registers_t registers, int irq);
+};
+
+#endif