diff options
Diffstat (limited to 'components/libc/timer')
| -rw-r--r-- | components/libc/timer/SConscript | 12 | ||||
| -rw-r--r-- | components/libc/timer/posix_sleep.c | 15 |
2 files changed, 0 insertions, 27 deletions
diff --git a/components/libc/timer/SConscript b/components/libc/timer/SConscript deleted file mode 100644 index a01700aa8d..0000000000 --- a/components/libc/timer/SConscript +++ /dev/null @@ -1,12 +0,0 @@ -# RT-Thread building script for component - -from building import * - -cwd = GetCurrentDir() -src = Glob('*.c') + Glob('*.cpp') -CPPPATH = [cwd] - -group = DefineGroup('libc', src, - depend = ['RT_USING_LIBC', 'RT_USING_POSIX_TIMER'], CPPPATH = CPPPATH) - -Return('group') diff --git a/components/libc/timer/posix_sleep.c b/components/libc/timer/posix_sleep.c deleted file mode 100644 index b4b33722ac..0000000000 --- a/components/libc/timer/posix_sleep.c +++ /dev/null @@ -1,15 +0,0 @@ -#include <stdlib.h> -#include <rtthread.h> - -#include <unistd.h> - -unsigned int sleep(unsigned int seconds) -{ - rt_tick_t delta_tick; - - delta_tick = rt_tick_get(); - rt_thread_delay(seconds * RT_TICK_PER_SECOND); - delta_tick = rt_tick_get() - delta_tick; - - return seconds - delta_tick/RT_TICK_PER_SECOND; -} |
