X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fphy_stub%2Fphy_stub_thread_hdl.c;h=f320001d5973dcb44a9fa6dc471284942d5ae33a;hb=f01eb5471d34834e2ef1d8dbbfc4b2fe68403650;hp=5b09351a2f80d526186da97edf881509ef4be5d9;hpb=438594773b3c93b5bbe8d1cb1d16626a02238b8b;p=o-du%2Fl2.git diff --git a/src/phy_stub/phy_stub_thread_hdl.c b/src/phy_stub/phy_stub_thread_hdl.c index 5b09351a2..f320001d5 100644 --- a/src/phy_stub/phy_stub_thread_hdl.c +++ b/src/phy_stub/phy_stub_thread_hdl.c @@ -44,7 +44,11 @@ pthread_t thread = 0; * ****************************************************************/ void *GenerateTicks(void *arg) { - int milisec = 1; /* 1ms */ +#ifdef NR_TDD + int milisec = 0.5; /* 0.5ms */ +#else + int milisec = 1; /* 1ms */ +#endif struct timespec req = {0}; req.tv_sec = 0; @@ -52,8 +56,7 @@ void *GenerateTicks(void *arg) while(1) { - nanosleep(&req, (struct timespec *)NULL); - + clock_nanosleep(CLOCK_REALTIME, 0, &req, NULL); /* Send Slot indication indication to lower mac */ l1BuildAndSendSlotIndication(); }