sleep ?
Rayman
Posts: 14,665
Is there a regular sleep function that works?
Tried sleep(), but it wasn't recognized.
Tried including unistd.h, but that gives errors...
Noticed in one demo that Steve made his own msleep and usleep functions...
Is that what we need to do?
Tried sleep(), but it wasn't recognized.
Tried including unistd.h, but that gives errors...
Noticed in one demo that Steve made his own msleep and usleep functions...
Is that what we need to do?
Comments
Eric
1> c:\propgcc\bin\../lib/gcc/propeller-elf/4.6.1/../../../../propeller-elf/include/time.h:9:16: error: conflicts with new declaration with 'C' linkage
Edit: although I haven't needed to use it in several months of intense PropGCC work. Can you post your code?
It sounds like propeller.h is missing an extern "C" declaration. As SRLM noted, you can wrap the whole thing up as follows in your program: while you're waiting for the header file to be fixed.
Eric
Just moved propeller.h after unistd.h and it seems happy now...
Eventually the real fix will be added, we don't want some order dependencies. It's fine for a temporary work-around.
BTW, usleep and friends will give at least the amount of time you would like and is appropriate for threading. Use waitcnt for deterministic delays (though it is not appropriate to use during threading).