On 24/10/17 10:20, Michael Schnell via Lazarus wrote: > On 24.10.2017 10:48, el es via Lazarus wrote: >> [...] >>>> begin >>>> repeat >>>> until not ThreadNowInUse; // >>>> try >>>> ThreadNowInUse :=true; >>> > Busy wait actions are usually a very bad idea > > Better use a TTimer for such. > > -Michael >
I suppose you'd need to look at the parent/my post, where it's in full code what this function does ;) tl/dr: it's a function that tries to get a time stamp in (maybe less) thread-safe / (I'd rather call it) reentrant way for use in thread timing and profiling. So no, TTimer not appropriate here. :) el es -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus