参考:https://www.cnblogs.com/xumenger/p/4687493.html
System.Classes.pas:
TList、(TStrings)TStringList
System.Contnrs.pas:
TObjectList、
TComponentList、TClassList、TOrderedList、
TStack、TObjectStack、
TQueue、TObjectQueue、
TCustomBucketList
System.Generics.Collections.pas:
TList<T>
TObjectList<T>
TDictionary<TKey, TValue>
TStack<T>
TQueue<T>
System.Diagnostics.pas:
procedure TfrmRandomWordSearch.FindGoodWord(const wordTest: TWordCheckDelegate); var word: string; isWordOK: boolean; time: TStopwatch; begin time := TStopwatch.StartNew; repeat word := GenerateWord; isWordOK := wordTest(word); until isWordOK or (time.ElapsedMilliseconds > 10000); if isWordOK then lbWords.ItemIndex := lbWords.Items.Add(Format('%s (%d ms)', [word, time.ElapsedMilliseconds])) else lbWords.ItemIndex := lbWords.Items.Add('timeout'); end;