#include"sleep.h"#include"timer.h"voidsleepMilliseconds(Thread*thread,uint32ms){uint32uptime=getUptimeMilliseconds();//target uptime to wakeupuint32target=uptime+ms;thread->state=TS_SLEEP;thread->state_privateData=(void*)target;enableInterrupts();halt();}