libxr 1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
thread.cpp
1#include "thread.hpp"
2
3#include "timebase.hpp"
4#include "timer.hpp"
5
6using namespace LibXR;
7
8Thread Thread::Current(void) { return Thread(); }
9
11{
14 {
16 }
17}
18
20{
22 {
24 }
26}
27
29
30void Thread::Yield() {}
线程管理类,封装 FreeRTOS 任务创建和调度 Thread management class encapsulating FreeRTOS task creation and scheduling
Definition thread.hpp:15
Thread()
默认构造函数,初始化空线程 Default constructor initializing an empty thread
Definition thread.hpp:35
static uint32_t GetTime()
获取当前系统时间(毫秒) Gets the current system time in milliseconds
Definition thread.cpp:16
static Thread Current(void)
获取当前线程对象 Gets the current thread object
Definition thread.cpp:7
static void Sleep(uint32_t milliseconds)
让线程进入休眠状态 Puts the thread to sleep
Definition thread.cpp:9
static void Yield()
让出 CPU 以执行其他线程 Yields CPU execution to allow other threads to run
Definition thread.cpp:18
static void SleepUntil(TimestampMS &last_waskup_time, uint32_t time_to_sleep)
让线程休眠直到指定时间点 Puts the thread to sleep until a specified time
Definition thread.cpp:11
static TimestampMS GetMilliseconds()
获取当前时间的毫秒级时间戳。 Gets the current timestamp in milliseconds.
Definition timebase.hpp:63
static void RefreshTimerInIdle()
在空闲时刷新定时器 Refreshes the timer during idle time
表示毫秒级时间戳的类。Class representing a timestamp in milliseconds.
LibXR Color Control Library / LibXR终端颜色控制库
constexpr auto min(T1 a, T2 b) -> typename std::common_type< T1, T2 >::type
计算两个数的最小值