src/unix.cpp
branchcpp_gui
changeset 6254 abc6ad7c035c
parent 6192 c6adfc929c6b
child 6298 c30fe89622df
child 6566 a780a47d6af3
child 9895 7bd07f43b0e3
equal deleted inserted replaced
6253:23983700e3d7 6254:abc6ad7c035c
   258 	extern struct timerequest *TimerRequest = NULL;
   258 	extern struct timerequest *TimerRequest = NULL;
   259 #endif // __AMIGA__
   259 #endif // __AMIGA__
   260 
   260 
   261 void CSleep(int milliseconds)
   261 void CSleep(int milliseconds)
   262 {
   262 {
   263 	#if !defined(__BEOS__) && !defined(__AMIGA__)
   263 	#if defined(PSP)
   264 		usleep(milliseconds * 1000);
   264 		sceKernelDelayThread(milliseconds * 1000);
   265 	#endif
   265 	#elif defined(__BEOS__)
   266 	#ifdef __BEOS__
       
   267 		snooze(milliseconds * 1000);
   266 		snooze(milliseconds * 1000);
   268 	#endif
   267 	#elif defined(__AMIGA__)
   269 	#if defined(__AMIGA__)
       
   270 	{
   268 	{
   271 		ULONG signals;
   269 		ULONG signals;
   272 		ULONG TimerSigBit = 1 << TimerPort->mp_SigBit;
   270 		ULONG TimerSigBit = 1 << TimerPort->mp_SigBit;
   273 
   271 
   274 		// send IORequest
   272 		// send IORequest
   280 		if (!((signals = Wait(TimerSigBit | SIGBREAKF_CTRL_C)) & TimerSigBit) ) {
   278 		if (!((signals = Wait(TimerSigBit | SIGBREAKF_CTRL_C)) & TimerSigBit) ) {
   281 			AbortIO((struct IORequest *)TimerRequest);
   279 			AbortIO((struct IORequest *)TimerRequest);
   282 		}
   280 		}
   283 		WaitIO((struct IORequest *)TimerRequest);
   281 		WaitIO((struct IORequest *)TimerRequest);
   284 	}
   282 	}
   285 	#endif // __AMIGA__
   283 	#else
       
   284 		usleep(milliseconds * 1000);
       
   285 	#endif
   286 }
   286 }
   287 
   287 
   288 #ifdef WITH_ICONV
   288 #ifdef WITH_ICONV
   289 
   289 
   290 #include <iconv.h>
   290 #include <iconv.h>