(* Collection of code snippets by Arne Vajhøj *)
(* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) *)
program guidgen;

{$APPTYPE CONSOLE}

uses
  Windows, SysUtils, ComObj, ActiveX;

const
  N = 1000000;

var
  id : TGUID;
  res : string;
  i, t1, t2 : integer;

begin
  t1 := GetTickCount;
  for i := 1 to N do begin
    CoCreateGuid(id);
    res := GUIDToString(id);
  end;
  t2 := GetTickCount;
  writeln((1000.0 * N / (t2 - t1)):2:1);
end.
