Delay.st
changeset 15630 9e0f47e44106
parent 15553 8e0b933a9d68
child 16288 c599c7f52198
child 18084 ab5b38bd8f81
equal deleted inserted replaced
15629:9d21f0949396 15630:9e0f47e44106
   160     ^ self new delay:(aNumber * 1000) rounded
   160     ^ self new delay:(aNumber * 1000) rounded
   161 !
   161 !
   162 
   162 
   163 until:aTimeStamp
   163 until:aTimeStamp
   164     "return a new Delay object, that will delay the active process
   164     "return a new Delay object, that will delay the active process
   165      until the system has reached the time represented by the argument.
   165      until the system has reached the time represented by the argument."
   166      BUG:
       
   167         due to the limited range of the millisecondTimer, this can 
       
   168         (currently) not be used for long delays. The maximum supported
       
   169         delay is returned by OperatingSystem>>maximumMillisecondTimeDelta."
       
   170 
   166 
   171     |numberOfMilliseconds|
   167     |numberOfMilliseconds|
   172 
   168 
   173     numberOfMilliseconds := aTimeStamp getMilliseconds - Timestamp now getMilliseconds.
   169     numberOfMilliseconds := aTimeStamp getMilliseconds - Timestamp now getMilliseconds.
   174     ^ self new delay:numberOfMilliseconds
   170     ^ self new delay:numberOfMilliseconds
   175 !
   171 !
   176 
   172 
   177 untilMilliseconds:aMillisecondTime
   173 untilMilliseconds:aMillisecondTime
   178     "return a new Delay object, that will delay the active process
   174     "return a new Delay object, that will delay the active process
   179      until the systems millisecond time has reached aMillisecondTime.
   175      until the systems millisecond time has reached aMillisecondTime."
   180     "
       
   181 
   176 
   182     ^ self new resumptionTime:aMillisecondTime
   177     ^ self new resumptionTime:aMillisecondTime
   183 
   178 
   184     "Modified: 18.4.1997 / 11:57:53 / stefan"
   179     "Modified: 18.4.1997 / 11:57:53 / stefan"
   185 ! !
   180 ! !
   362 ! !
   357 ! !
   363 
   358 
   364 !Delay class methodsFor:'documentation'!
   359 !Delay class methodsFor:'documentation'!
   365 
   360 
   366 version
   361 version
   367     ^ '$Header: /cvs/stx/stx/libbasic/Delay.st,v 1.47 2013-07-25 09:35:36 cg Exp $'
   362     ^ '$Header: /cvs/stx/stx/libbasic/Delay.st,v 1.48 2013-08-16 09:38:32 stefan Exp $'
   368 !
   363 !
   369 
   364 
   370 version_CVS
   365 version_CVS
   371     ^ '$Header: /cvs/stx/stx/libbasic/Delay.st,v 1.47 2013-07-25 09:35:36 cg Exp $'
   366     ^ '$Header: /cvs/stx/stx/libbasic/Delay.st,v 1.48 2013-08-16 09:38:32 stefan Exp $'
   372 ! !
   367 ! !
   373 
   368