+double
+randspeed(void)
+{
+ const int low = 1;
+ const int high = 2;
+ return ((rand() % (high - low + 1)) + low) / 100.0;
+}
+
+int
+randsign(void)
+{
+ return pow(-1, rand());
+}
+
+void
+msleep(void)
+{
+ struct timeval timeout;
+ timeout.tv_usec = 10000;
+ select(NULL, NULL, NULL, NULL, &timeout); // Sleep 100 ms
+}
+