Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
This commit is contained in:
commit
d2aaa2c9a2
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "8";
|
||||
public const string Build = "3";
|
||||
public const string Revision = "3197";
|
||||
public const string Revision = "3199";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=8
|
||||
%REVISION%=3197
|
||||
%REVISION%=3199
|
||||
%COREVERSION%=3
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.8.3.3197
|
||||
3.8.3.3199
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.8.3.3197'
|
||||
!define VERSION '3.8.3.3199'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit Utils;
|
||||
|
||||
|
|
@ -10,6 +10,8 @@ function RecordToByteArray(obj : object): array of byte;
|
|||
procedure ShowMessage(msg: string);
|
||||
procedure ShowMessage(msg,capt: string);
|
||||
function GetFunctionPointer(fnc : Delegate) : integer;
|
||||
/// Замеряет время работы процедуры p в миллисекундах. Производит n запусков и усредняет время работы
|
||||
function Benchmark(p: procedure; n: integer := 100): real;
|
||||
|
||||
implementation
|
||||
|
||||
|
|
@ -43,5 +45,15 @@ begin
|
|||
Result := System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(fnc).ToInt32;
|
||||
end;
|
||||
|
||||
function Benchmark(p: procedure; n: integer): real;
|
||||
begin
|
||||
var sw := new Stopwatch;
|
||||
sw.Start;
|
||||
loop n do
|
||||
p;
|
||||
sw.Stop;
|
||||
Result := sw.ElapsedMilliseconds/n;
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit Utils;
|
||||
|
||||
|
|
@ -10,6 +10,8 @@ function RecordToByteArray(obj : object): array of byte;
|
|||
procedure ShowMessage(msg: string);
|
||||
procedure ShowMessage(msg,capt: string);
|
||||
function GetFunctionPointer(fnc : Delegate) : integer;
|
||||
/// Замеряет время работы процедуры p в миллисекундах. Производит n запусков и усредняет время работы
|
||||
function Benchmark(p: procedure; n: integer := 100): real;
|
||||
|
||||
implementation
|
||||
|
||||
|
|
@ -43,5 +45,15 @@ begin
|
|||
Result := System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(fnc).ToInt32;
|
||||
end;
|
||||
|
||||
function Benchmark(p: procedure; n: integer): real;
|
||||
begin
|
||||
var sw := new Stopwatch;
|
||||
sw.Start;
|
||||
loop n do
|
||||
p;
|
||||
sw.Stop;
|
||||
Result := sw.ElapsedMilliseconds/n;
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
Loading…
Reference in a new issue