From 09e89c867c8dc14adee298176a0a4c72d8f32245 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Tue, 7 Aug 2012 16:54:36 +0200 Subject: Split out reusable parts into the laks project. --- os/time.h | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 os/time.h (limited to 'os/time.h') diff --git a/os/time.h b/os/time.h deleted file mode 100644 index f4706e0..0000000 --- a/os/time.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef TIME_H -#define TIME_H - -#include "thread.h" - -class Time { - private: - static volatile uint32_t systime; - - public: - inline static void tick() { - systime++; - } - - inline static void sleep(uint32_t ms) { - ms += systime; - while(systime < ms) { - Thread::yield(); - } - } -}; - -#endif -- cgit v1.2.3