X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ccdbg-io.c;h=b78e3aad2d5795a5c2bc8ad968a2843e671bc0cf;hp=c69fc0d816751172b190393a96de95bbc047f83d;hb=4ecfc33f16aa36b315519e6f279da65374b67aba;hpb=5df84df7cd6a31527dcfd11030f00ef9d8abf170 diff --git a/ccdbg-io.c b/ccdbg-io.c index c69fc0d8..b78e3aad 100644 --- a/ccdbg-io.c +++ b/ccdbg-io.c @@ -17,17 +17,15 @@ */ #include "ccdbg.h" - -void -ccdbg_quarter_clock(struct ccdbg *dbg) -{ - usleep(CC_CLOCK_US / 4); -} +#include void ccdbg_half_clock(struct ccdbg *dbg) { - usleep(CC_CLOCK_US / 2); + struct timespec req, rem; + req.tv_sec = (CC_CLOCK_US / 2) / 1000000; + req.tv_nsec = ((CC_CLOCK_US / 2) % 1000000) * 1000; + nanosleep(&req, &rem); } struct ccdbg *