KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to send signals between processes and I need to allow a random time delay of between 0.01 and 0.1 seconds in my signal generation loop. So this is what I'm doing and it is most certainly not between 0.01 and 0.1, but comes out as 1 second. Not sure what I'm missing here. sleepTime = 100000L+(long)((1e6-1e5)*rand()/(RAND_MAX+1.0)); usleep(sleepTime);
Tags (comma-separated)
Save Edits
Cancel