equal
deleted
inserted
replaced
307 [ |
307 [ |
308 [ |
308 [ |
309 Processor signal:delaySemaphore atMilliseconds:then. |
309 Processor signal:delaySemaphore atMilliseconds:then. |
310 Processor activeProcess setStateTo:#timeWait if:#active. |
310 Processor activeProcess setStateTo:#timeWait if:#active. |
311 delaySemaphore wait. |
311 delaySemaphore wait. |
312 ] doWhile:[ |
312 |
313 (dueTime notNil |
313 dueTime notNil |
314 and:[isInterrupted not |
314 and:[isInterrupted not |
315 and:[(currentDelta := dueTime - OperatingSystem getMicrosecondTime) > 0]] |
315 and:[(currentDelta := dueTime - OperatingSystem getMicrosecondTime) > 0 |
316 ) ifTrue:[ |
316 and:[ |
317 currentDelta := (currentDelta // 1000) min:16r0fffffff. |
317 currentDelta := (currentDelta // 1000) min:16r0fffffff. |
318 now := OperatingSystem getMillisecondTime. |
318 now := OperatingSystem getMillisecondTime. |
319 then := OperatingSystem millisecondTimeAdd:now and:currentDelta. |
319 then := OperatingSystem millisecondTimeAdd:now and:currentDelta. |
320 true. |
320 true.]]] |
321 ] ifFalse:[ false ] |
321 ] whileTrue. |
322 ]. |
|
323 ] ensure:[ |
322 ] ensure:[ |
324 wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
323 wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
325 ] |
324 ] |
326 |
325 |
327 " |
326 " |
357 ! ! |
356 ! ! |
358 |
357 |
359 !Delay class methodsFor:'documentation'! |
358 !Delay class methodsFor:'documentation'! |
360 |
359 |
361 version |
360 version |
362 ^ '$Header: /cvs/stx/stx/libbasic/Delay.st,v 1.48 2013-08-16 09:38:32 stefan Exp $' |
361 ^ '$Header: /cvs/stx/stx/libbasic/Delay.st,v 1.49 2014-03-28 13:40:34 stefan Exp $' |
363 ! |
362 ! |
364 |
363 |
365 version_CVS |
364 version_CVS |
366 ^ '$Header: /cvs/stx/stx/libbasic/Delay.st,v 1.48 2013-08-16 09:38:32 stefan Exp $' |
365 ^ '$Header: /cvs/stx/stx/libbasic/Delay.st,v 1.49 2014-03-28 13:40:34 stefan Exp $' |
367 ! ! |
366 ! ! |
368 |
367 |