Esempio n. 1
0
void movesStart (WaitFor waitForRoutine, float waitForParam)
{
	nxtDisplayCenteredTextLine(5, "Starting");

	if (moveModeTiming == MMOneMoveAtATime || stepThroughMode == stepThroughModeOn) {
	} else {
		switch (waitForRoutine) {
		case WFTouch:
				waitForTouch();
				break;
		case WFLoud:
			waitForLoud(waitForParam);
			break;
		case WFTime:
			waitForTime(waitForParam);
			break;
		case WFNothing:
			default:
			break;
		}
	}
}
Esempio n. 2
0
 /**
  * Waits until the absolute time specified using struct THRIFT_TIMESPEC.
  * Returns 0 if condition occurs, THRIFT_ETIMEDOUT on timeout, or an error code.
  */
 int waitForTime(const THRIFT_TIMESPEC* abstime) {
   struct timeval temp;
   temp.tv_sec  = static_cast<long>(abstime->tv_sec);
   temp.tv_usec = static_cast<long>(abstime->tv_nsec) / 1000;
   return waitForTime(&temp);
 }