<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Hmm... #busyWait would eat up more CPU cycles to gain accuracy. What about #waitPrecisely? Then you would not reveal that little implementation detail. And clients could make the decision between #wait and #waitPrecisely depending on whether they need accuracy, not whether they have CPU cycles to spare. Or #waitExactly? There must be some good name out there. :-)<div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class='history_container' type='cite' style='border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;'>
                        <p style='color: #AAAAAA; margin-top: 10px;'>Am 01.07.2021 19:18:36 schrieb Thiede, Christoph <christoph.thiede@student.hpi.uni-potsdam.de>:</p><div style='font-family:Arial,Helvetica,sans-serif'>
<div id="divtagdefaultwrapper" style="font-size: 12pt;color: #000000;font-family: Calibri,Helvetica,sans-serif" dir="ltr">
<p>Hi all,</p>
<p><br>
</p>
<p>I just made an interesting observation:</p>
<p><br>
</p>
<p><span>[1000 timesRepeat: [0.001 seconds wait]] timeToRun. "--> 2612"</span><br>
</p>
<p><span><br>
</span></p>
<p><span>I think the reason for this might be that Delay >> #schedule uses a critical section that is also accessed by the <span>TimerEventLoop process with the highest priority in the system, so the synchronization overhead would be the bottleneck in this
 case.</span></span></p>
<p><span><span><br>
</span></span></p>
<p><span><span>Instead, if you need to produce many short delays anyway (for instance, to simulate a running process, just like me right new), you can use a busy-wait instead:</span></span></p>
<p><br>
</p>
<p></p>
<div>Duration >> busyWait</div>
<div><br>
</div>
<div><span style="white-space:pre"></span>| proceedTime |</div>
<div><span style="white-space:pre"></span>proceedTime := Time utcMicrosecondClock + self asMicroSeconds.</div>
<div><span style="white-space:pre"></span>[Time utcMicrosecondClock >= proceedTime] whileFalse</div>
<br>
<p></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;color: rgb(0, 0, 0);font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols">
<div name="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif;font-size: ;margin: 0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><span style="font-family: Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont">
<div><font size="3" color="black"><span style="font-size: 12pt"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</span></div>
</div>
</div>
</div>
<div class="_rp_T4" id="Item.MessagePartBody"><span>[1000 timesRepeat: [0.001 seconds busyWait]] timeToRun "--> 1000"</span><br>
</div>
<div class="_rp_T4" id="Item.MessagePartBody"><span>Much faster.</span></div>
<div class="_rp_T4" id="Item.MessagePartBody"><span><br>
</span></div>
<div class="_rp_T4" id="Item.MessagePartBody"><span>Could we need this in the Trunk, too?</span></div>
<div class="_rp_T4" id="Item.MessagePartBody"><span><br>
</span></div>
<div class="_rp_T4" id="Item.MessagePartBody"><span>Best,</span></div>
<div class="_rp_T4" id="Item.MessagePartBody"><span>Christoph</span></div>
</div>
<div><span style="font-size: 10pt;color: #808080"></span></div>
</div>
</div>
</div>
</div>
</div></blockquote>
                                        </div></body>