Browse Source

* standalone timing program for systems not having a time command

git-svn-id: trunk@8619 -
florian 18 years ago
parent
commit
8a70b3ec8b
2 changed files with 17 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 16 0
      tests/utils/fptime.pp

+ 1 - 0
.gitattributes

@@ -7235,6 +7235,7 @@ tests/utils/dbtests.pp svneol=native#text/plain
 tests/utils/digest.pp svneol=native#text/plain
 tests/utils/digest.pp svneol=native#text/plain
 tests/utils/dotest.pp svneol=native#text/plain
 tests/utils/dotest.pp svneol=native#text/plain
 tests/utils/fail.pp svneol=native#text/plain
 tests/utils/fail.pp svneol=native#text/plain
+tests/utils/fptime.pp svneol=native#text/plain
 tests/utils/libtar.pas svneol=native#text/plain
 tests/utils/libtar.pas svneol=native#text/plain
 tests/utils/macos/LinkRunDir -text
 tests/utils/macos/LinkRunDir -text
 tests/utils/macos/LinkRunTests -text
 tests/utils/macos/LinkRunTests -text

+ 16 - 0
tests/utils/fptime.pp

@@ -0,0 +1,16 @@
+uses
+  bench,sysutils;
+var
+  i : longint;
+  ps : ansistring;
+  sticks : int64;
+begin
+  if paramcount>0 then
+    begin
+      for i:=2 to paramcount do
+        ps:=ps+' '+paramstr(i);
+      sticks:=GetMicroSTicks;
+      ExecuteProcess(paramstr(1),ps);
+      writeln((GetMicroSTicks-sticks)/1000:0:3,' ms');
+    end;
+end.