[Glass] Time and System millisecondsToRun

Dale Henrichs dale.henrichs at gemtalksystems.com
Thu Aug 27 15:30:54 PDT 2020


Time class>>millisecondsToRun: is a Pharo compatibility method (the clue 
is that the method is in the *squeak method category) and is implemented 
to use Time class>>millisecondsElapsedTime: (the clue is that that 
method is not in a package and is in the Measuring category of a 
GemStone kernel class).

Dale

On 8/27/20 2:59 PM, James Foster via Glass wrote:
> Time class>>millisecondsElapsedTime: is measuring elapsed (“wall clock”) time, including time that other processes are running and the process is waiting for I/O or other tasks to finish. There is no method #millisecondsToRun: in Time.
>
> System is measuring CPU time used by the process, excluding time waiting for semaphores.
>
>> On Aug 27, 2020, at 2:15 PM, bruno buzzi brassesco via Glass <glass at lists.gemtalksystems.com> wrote:
>>
>> Hi,
>>
>> Why there is a difference answer in the following expressions ? (tested on GS 3.5.1 and 3.3.7)
>>
>> Time millisecondsToRun: [(Delay forSeconds: 4) wait]. "answer 4000  -> computing the delay time "
>>
>> System millisecondsToRun: [(Delay forSeconds: 4) wait]. "answer 0 -> NOT computing the delay time"
>>
>> It seems a difference in how time is computed:
>> System use primitive 178 and Time use primitive 13.
>>
>> So Time check actual time difference while System check CPU time consumed then excluding delays.
>>
>> regards,
>> bruno
>>
>> _______________________________________________
>> Glass mailing list
>> Glass at lists.gemtalksystems.com
>> https://lists.gemtalksystems.com/mailman/listinfo/glass
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> https://lists.gemtalksystems.com/mailman/listinfo/glass


More information about the Glass mailing list