4#include <webots/robot.h>
6#include "condition_var.hpp"
7#include "libxr_system.hpp"
18 _libxr_webots_time_notify->
Wait(1);
26 _libxr_webots_time_notify->
Wait(1);
条件变量封装类 / Condition variable wrapper class
ErrorCode Wait(uint32_t timeout)
等待条件变量 / Waits for the condition variable
线程管理类,封装 FreeRTOS 任务创建和调度 Thread management class encapsulating FreeRTOS task creation and scheduling
Thread()
默认构造函数,初始化空线程 Default constructor initializing an empty thread
static uint32_t GetTime()
获取当前系统时间(毫秒) Gets the current system time in milliseconds
static Thread Current(void)
获取当前线程对象 Gets the current thread object
static void Sleep(uint32_t milliseconds)
让线程进入休眠状态 Puts the thread to sleep
static void Yield()
让出 CPU 以执行其他线程 Yields CPU execution to allow other threads to run
static void SleepUntil(TimestampMS &last_waskup_time, uint32_t time_to_sleep)
让线程休眠直到指定时间点 Puts the thread to sleep until a specified 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
计算两个数的最小值