Re: [Lazarus] Open file dialog speed

2014-05-28 Thread Chris Crori


   From: Martin Frb
   Sent: Wednesday, May 28, 2014 3:31 AM
   To: Lazarus mailing list
   Subject: Re: [Lazarus] Open file dialog speed
   On 27/05/2014 18:15, Chris Crori wrote:

   Hi guys,
   Is there anything I can do to speed up the TOpenDialog window in 
windows? It takes more than 2 seconds in my application in Lazarus, a lot 
more than in any application I run on the same computer (Windows7, 
32 bit)




   When your app runs in the IDE, or when you run your app outside the IDE?

   In the IDE it is slower, because GDB tracks every library that is 
loaded, and TOpenDialog can import many dll.


   If it is only in the IDE/Debugger, and bothers you a lot, then try this 
(autosolib):

   
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#gdb.exe_has_stopped_working
   It may improve it a little bit. It does not affect outside the IDE.



It is slow even outside the IDE with strip symbols checked. I noticed slow 
loading so at first I thought windows were slow on loading (first time was 
slower than the others) but then I run LibreOffice and the same dialog was 
loading very fast in that.
The 2 second time is inside the IDE, with GDB on, but this is just for me 
and I don't mind so much 



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] how to set two memos for parallel text editing ?

2014-05-28 Thread Howard Page-Clark

On 28/05/2014 00:46, Etienne Leblois wrote:

 how to manage that scrolling or arrowing up in one memo will also
scroll up the other one ?


The following Windows example shows how to synchronise scrolling between 
two memos (Memo1, Memo2) using scrollbar movement. Responding to memo 
caret movement in addition would require more code based on the same 
message-interception ideas.


//== code ==

unit mainScrollMemo;

{$mode objfpc}{$H+}

interface

uses
  Classes, Forms, Controls, LMessages, StdCtrls;

type

  TForm1 = class(TForm)
Memo1: TMemo;
Memo2: TMemo;
procedure FormCreate(Sender: TObject);
  private
FOrgMemoWndProc: TWndMethod;
procedure MemoWndMethod(var theMessage: TLMessage);
  end;

var
  Form1: TForm1;

implementation

uses windows;

{$R *.lfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  FOrgMemoWndProc:=Memo1.WindowProc;
  Memo1.WindowProc:=@MemoWndMethod;
  memo1.Lines.LoadFromFile('..\..\mainscrollmemo.pp');
  memo2.Lines.LoadFromFile('..\..\mainscrollmemo.pp');
end;

procedure TForm1.MemoWndMethod(var theMessage: TLMessage);
begin
  FOrgMemoWndProc(theMessage);

  if theMessage.msg=LM_VSCROLL then
SendMessage(Memo2.Handle, WM_VSCROLL, theMessage.wParam , 
theMessage.lParam);


  if theMessage.wParamlo=SB_THUMBTRACK then
SetScrollPos(Memo2.Handle, SB_VERT, theMessage.wParamhi, True);
end;

end.

//== code end ==

You should be able to adapt this to your needs.

Howard



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] EpikTimer v1.0.1 released

2014-05-28 Thread Michael Schnell

On 05/26/2014 05:23 PM, Graeme Geldenhuys wrote:

Like its always been done.


So it will be a ZIP file containing a directory with the source code and 
an lpk file to allow using it as a Lazarus package.


This is OK for me, provided there is a documentation file that briefly 
explains how to use it within Lazarus (install package) and without 
(define unit path).


Thanks !
-Michael


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] EpikTimer v1.0.1 released

2014-05-28 Thread Michael Schnell

On 05/27/2014 03:54 AM, Paul Breneman wrote:


Will EpikTimer work in a console app?  If so, an example on the wiki 
page would sure be appreciated.  I need it now (for an Android Linux 
console program)!  :)




Soft answer: Yes


Long answer:

My current test-state of the interfaces.pas unit for the would-be 
ActiveNoGUI widget type in Lazarus happily uses the current 
half-released state of EpikTimer. It provides a Lazarus compatible 
TTimer implementation.


It is used in a test project (a command-line tool) and works perfectly 
for me (in Linux X86 32 Bit Linux ).


I did not yet do any tests with Android or ARM, though.


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] EpikTimer v1.0.1 released

2014-05-28 Thread hinstance
I used EpikTimer on Android ARM, it works Well, at least it seems to work. 
Why you need an example? Just use it; the process is obvious and 
straightforward. Add epiktimer unit to uses seciton of ur source file; clear 
timer, start timer, stop timer, read result

28.05.2014, 13:26, Michael Schnell mschn...@lumino.de:
 On 05/27/2014 03:54 AM, Paul Breneman wrote:
  Will EpikTimer work in a console app?  If so, an example on the wiki
  page would sure be appreciated.  I need it now (for an Android Linux
  console program)!  :)

 Soft answer: Yes

 Long answer:

 My current test-state of the interfaces.pas unit for the would-be
 ActiveNoGUI widget type in Lazarus happily uses the current
 half-released state of EpikTimer. It provides a Lazarus compatible
 TTimer implementation.

 It is used in a test project (a command-line tool) and works perfectly
 for me (in Linux X86 32 Bit Linux ).

 I did not yet do any tests with Android or ARM, though.

 -Michael

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Gdb and openocd via lazarus

2014-05-28 Thread Koenraad Lelong

op 21-05-14 20:17, Martin Schreiber schreef:



In MSEide the procedure is as follows - I assume same as in Lazarus:
In 'Start gdb server command run target' write the command or script which
starts the OpenOCD gdb proxy server (I don't know the command).
Set 'Wait before connect' to the GDB server startup time + some reserve.
'Target connection' = remote localhost:

Activate 'gdb download' then MSEide will use the gdb load command for
program download.

I suggest to make first a minimal C-program with the gcc toolchain of your
target. If that works the FPC adventure can start. ;-)

Martin


Hi,

I tried to debug my arm-board with MSEide.
I manually started openocd (I need to be root). I configured MSEide 
debugger : Target connection : extended-remote localhost:.
I configured debug-target to the elf-file of my project. Is there a 
macro to add an extention to the make-output-file ?

I compiled the project and manually flashed it, and I left it in reset halt.
I then can attach to the target, I see gdb connecting to openocd. I get 
the proper source in the source window. I can start the project, but 
since there seems still a problem with the compile-fase (the resulting 
binary does not work properly) I tried to reset the board. There gdb 
drops the connection to the target.


When I set a breakpoint, the target halts, but MSEide does not indicate 
in the source where it stops. I can step, but again MSEide does not 
follow in the source.


I can continue the target and stop it. But when I stop it, no 
indication where in the source it stopped.


So progress, but not there yet. Or maybe I'm doing things wrong ?

I still need to find why the binary is not good. When I compile the 
project via cli, it's working. From within MSEide, it does not work, 
although the command-line is the same as my manual command-line. I will 
add -va again and compare the outputs.


Koenraad.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Gdb and openocd via lazarus

2014-05-28 Thread Martin Schreiber
On Wednesday 28 May 2014 12:36:57 Koenraad Lelong wrote:

 I tried to debug my arm-board with MSEide.
 I manually started openocd (I need to be root).

Maybe it could be done by a root script with setuser flag 
in 'Project'-'Options'-'Debugger'-'Target'-'Start gdb server command run 
target'.

 I configured MSEide 
 debugger : Target connection : extended-remote localhost:.

Up to now I used remote only.

 I configured debug-target to the elf-file of my project. Is there a
 macro to add an extention to the make-output-file ?

The gdb target file can be defined in 'Project'-'Options'-'Debugger'-'Debug 
Target' (as you did). There is a predefined macro ${EXEEXT} in 'Settings' for 
global access or define your own project specific macros 
in 'Project'-'Options'-'Macros'. It is possible to save such a customized 
project as template for future. MSEide project templates are normal project 
(*.prj)-files.

 I compiled the project and manually flashed it, and I left it in reset
 halt. I then can attach to the target, I see gdb connecting to openocd. I
 get the proper source in the source window. I can start the project, but
 since there seems still a problem with the compile-fase (the resulting
 binary does not work properly) I tried to reset the board. There gdb drops
 the connection to the target.

 When I set a breakpoint, the target halts, but MSEide does not indicate
 in the source where it stops. I can step, but again MSEide does not
 follow in the source.

 I can continue the target and stop it. But when I stop it, no
 indication where in the source it stopped.

The searched source directories must be listed 
in 'Project'-'Options'-'Debugger'-'Source directories'.
What shows the status line below the MSEide main menu?

BTW, the MSEide+MSEgui mailinglist is here:
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Archive and NNTP gateway:
http://news.gmane.org/gmane.comp.ide.mseide.user
I don't think the theme is appropriate for this list. ;-)

Martin

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Gdb and openocd via lazarus

2014-05-28 Thread Koenraad Lelong

op 28-05-14 13:21, Martin Schreiber schreef:


I don't think the theme is appropriate for this list. ;-)


I hesitated to post in the Lazarus-list, because it's indeed not 
lazarus-related anymore.

I find the theme is appopriate : gdb-debugging of pascal-source.

I'll subscribe to yet another list, and contunue there.

Koenraad


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Gdb and openocd via lazarus

2014-05-28 Thread Michael Ring

If I were you I would try to start as low-level as possible.

To do  so, please check if your gdb is configured with textui enabled ( 
try starting it with arm-none-eabi-gdb --tui )


if only commandline shows up then download gdb and recompile it:

cd  gdb
./configure--target=arm-none-eabi--prefix=/usr/local  
--program-prefix=arm-none-eabi---disable-werror --enable-tui


This Text UI is very nice for finding out if the problem is related to 
gdb or to the integration of gdb into the ide.


Here's how I call gdb:

arm-none-eabi-gdb hello.elf --tui --eval-command=target extended : 
--eval-command=monitor reset halt --eval-command=set mem 
inaccessible-by-default off --eval-command=load



This loads the binary, you should end up with the debugger showing you 
your source code.


Now try stepping through the code, if all is fine then great, problem is 
in the integration of gdb.


Stept I use:
break main
cont

step

When stepping does not work you can go deeper:

add

--eval-command=layout asm --eval-command=layout regs

to the commandline and start over, now you can single step through the 
assembler code with


stepi

This should help you to track down your problems (I hope)

Michael

Am 28.05.14 12:36, schrieb Koenraad Lelong:

op 21-05-14 20:17, Martin Schreiber schreef:



In MSEide the procedure is as follows - I assume same as in Lazarus:
In 'Start gdb server command run target' write the command or script 
which

starts the OpenOCD gdb proxy server (I don't know the command).
Set 'Wait before connect' to the GDB server startup time + some reserve.
'Target connection' = remote localhost:

Activate 'gdb download' then MSEide will use the gdb load command for
program download.

I suggest to make first a minimal C-program with the gcc toolchain of 
your

target. If that works the FPC adventure can start. ;-)

Martin


Hi,

I tried to debug my arm-board with MSEide.
I manually started openocd (I need to be root). I configured MSEide 
debugger : Target connection : extended-remote localhost:.
I configured debug-target to the elf-file of my project. Is there a 
macro to add an extention to the make-output-file ?
I compiled the project and manually flashed it, and I left it in reset 
halt.
I then can attach to the target, I see gdb connecting to openocd. I 
get the proper source in the source window. I can start the project, 
but since there seems still a problem with the compile-fase (the 
resulting binary does not work properly) I tried to reset the board. 
There gdb drops the connection to the target.


When I set a breakpoint, the target halts, but MSEide does not 
indicate in the source where it stops. I can step, but again MSEide 
does not follow in the source.


I can continue the target and stop it. But when I stop it, no 
indication where in the source it stopped.


So progress, but not there yet. Or maybe I'm doing things wrong ?

I still need to find why the binary is not good. When I compile the 
project via cli, it's working. From within MSEide, it does not work, 
although the command-line is the same as my manual command-line. I 
will add -va again and compare the outputs.


Koenraad.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] what is function header problem ?

2014-05-28 Thread FreeMan
I'm trying port some code, I get this error. IDE code complied is work, 
rename tool working.

what is wrong?
Thank you
Kubuntu 14.04 x64, fpc svn r27818 lazarus svn r45213

/comp/asg.pas(100,10) Error: function header doesn't match the previous 
declaration 
DrawEx(TCanvas;AnsiString;TRect;TCustomImageList;LongInt;LongInt;LongInt;LongInt;LongInt;Boolean;Boolean;Boolean;Boolean;Boolean;Boolean;Boolean;Boolean;Double;TGraphicsColor;TGraphicsColor;TGraphicsColor;TGraphicsColor;var 
AnsiString;var AnsiString;var A


this is function implementation:

function DrawEx(Canvas: TCanvas; s: string; fr: TRect; FImages: 
TCustomImageList; XPos
  , YPos, FocusLink, HoverLink, ShadowOffset: Integer; CheckHotSpot, 
CheckHeight

  , Print, Selected, Blink, HoverStyle, WordWrap
  , Down: Boolean; ResFactor: Double; URLColor, HoverColor, HoverFontColor
  , ShadowColor: TColor; var AnchorVal, StripVal, FocusAnchor
  , AnchorHint: string; var XSize, YSize, HyperLinks
  , MouseLink: Integer; var HoverRect, ControlRect: TRect; var CID, CV
  , CT: string; ic: THTMLPictureCache; pc: TPictureContainer; 
WinHandle: THandle): Boolean;

begin
//
end;





--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] what is function header problem ?

2014-05-28 Thread Hans-Peter Diettrich

FreeMan schrieb:
I'm trying port some code, I get this error. IDE code complied is work, 
rename tool working.

what is wrong?
Thank you
Kubuntu 14.04 x64, fpc svn r27818 lazarus svn r45213

/comp/asg.pas(100,10) Error: function header doesn't match the previous 
declaration 
DrawEx(TCanvas;AnsiString;TRect;TCustomImageList;LongInt;LongInt;LongInt;LongInt;LongInt;Boolean;Boolean;Boolean;Boolean;Boolean;Boolean;Boolean;Boolean;Double;TGraphicsColor;TGraphicsColor;TGraphicsColor;TGraphicsColor;var 
AnsiString;var AnsiString;var A


When you override a method in a derived class, the method declaration 
must match the declaration in the *base class* (previous declaration).


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] [FIXED] what is function header problem ?

2014-05-28 Thread FreeMan

interface
uses
  //Graphics, PictureContainer, Classes, Controls, ComCtrls, Dialogs, 
ImgList, Messages,LCLType, types, InterfaceBase;


  LCLType, {LCLIntf, LMessages,} Graphics, PictureContainer, Classes, 
Controls

  , ImgList, SysUtils, Messages,  Types, InterfaceBase;

Just changed uses lines. ???


28-05-2014 17:06 tarihinde, FreeMan yazdı:
I'm trying port some code, I get this error. IDE code complied is 
work, rename tool working.

what is wrong?
Thank you
Kubuntu 14.04 x64, fpc svn r27818 lazarus svn r45213

/comp/asg.pas(100,10) Error: function header doesn't match the 
previous declaration 
DrawEx(TCanvas;AnsiString;TRect;TCustomImageList;LongInt;LongInt;LongInt;LongInt;LongInt;Boolean;Boolean;Boolean;Boolean;Boolean;Boolean;Boolean;Boolean;Double;TGraphicsColor;TGraphicsColor;TGraphicsColor;TGraphicsColor;var 
AnsiString;var AnsiString;var A





--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] what is function header problem ?

2014-05-28 Thread Sven Barth
Am 28.05.2014 16:07 schrieb FreeMan freema...@delphiturkiye.com:
 /comp/asg.pas(100,10) Error: function header doesn't match the previous
declaration
DrawEx(TCanvas;AnsiString;TRect;TCustomImageList;LongInt;LongInt;LongInt;LongInt;LongInt;Boolean;Boolean;Boolean;Boolean;Boolean;Boolean;Boolean;Boolean;Double;TGraphicsColor;TGraphicsColor;TGraphicsColor;TGraphicsColor;var
AnsiString;var AnsiString;var A


Maybe we should have the compiler report the unit where a parameter type
came from as well... (and additionally in this case the previous
declaration)

Regards,
Sven
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] OpenGL

2014-05-28 Thread Chavoux Luyt
Hi Lazarati

I have two questions:
1. Have there ever been a Free Pascal implementation of OpenGL? I would
like to learn OpenGL and was wondering if I will be forced to use C++/C or
if there are other options.
2. I know there are (or have been) various OpenGL Lazarus components (e.g.
GLScene, NX etc) and game engines? (JEDI SDL != OpenGL?). Which would you
advice me to install/use for learning OpenGL and why? I am not asking for a
flame-war, so please state when it is just your opinion or else give a
reason.
3. Ultimately I would like to be able to write and use a game engine based
on OpenGL (in Pascal if possible) including sound etc.

Thanks
Chavoux
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OpenGL

2014-05-28 Thread Dmitry Boyarintsev
On Wed, May 28, 2014 at 11:34 AM, Chavoux Luyt chav...@gmail.com wrote:

 I have two questions:

Here're two answers:


 1. Have there ever been a Free Pascal implementation of OpenGL? I would
 like to learn OpenGL and was wondering if I will be forced to use C++/C or
 if there are other options.

 http://wiki.freepascal.org/OpenGL

2. I know there are (or have been) various OpenGL Lazarus components (e.g.
 GLScene, NX etc) and game engines? (JEDI SDL != OpenGL?). Which would you
 advice me to install/use for learning OpenGL and why? I am not asking for a
 flame-war, so please state when it is just your opinion or else give a
 reason.

http://wiki.freepascal.org/Game_Engine
http://wiki.freepascal.org/FPC_and_SDL
Install the one you find the easiest tutorial for.


 3. Ultimately I would like to be able to write and use a game engine based
 on OpenGL (in Pascal if possible) including sound etc.

http://wiki.freepascal.org/Audio_libraries

thanks,
Dmitry
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] what is function header problem ?

2014-05-28 Thread FreeMan
It was not any class's part, just normal function, (previous 
declaration) mean at this moment, define in upper on implementation 
area. for can use other units.

Thank you for answer

28-05-2014 17:51 tarihinde, Hans-Peter Diettrich yazdı:
When you override a method in a derived class, the method declaration 
must match the declaration in the *base class* (previous declaration). 


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Gdb and openocd via lazarus

2014-05-28 Thread Martin Schreiber
On Wednesday 28 May 2014 12:36:57 Koenraad Lelong wrote:

 I tried to debug my arm-board with MSEide.
 I manually started openocd (I need to be root).

Is the debug interface connected by USB? Then it is possible to setup an udev 
rule in order to allow non-root access. Copy a file to /etc/udev/rules.d, for 
the J-Link for example I named it 99-jlink_mse.rules, the content:

ACTION!=add, SUBSYSTEM!==usb_device, GOTO=jlink_rules_end
ATTR{idProduct}==0101, ATTR{idVendor}==1366, MODE=664, GROUP=users
ATTR{idProduct}==0102, ATTR{idVendor}==1366, MODE=664, GROUP=users
ATTR{idProduct}==0103, ATTR{idVendor}==1366, MODE=664, GROUP=users
ATTR{idProduct}==0104, ATTR{idVendor}==1366, MODE=664, GROUP=users
ATTR{idProduct}==0105, ATTR{idVendor}==1366, MODE=664, GROUP=users
LABEL=jlink_rules_end

lsusb -v lists the connected USB-devices with their device descriptor.
The file provided by Segger did not work because of an unknown BUS variable 
and SYSFS instead of ATTR.

I tried to connect an EFM32 board by openocd-J-Link-SWD-Chip, sadly the 
openocd J-Link driver supports JTAG only. :-(

Martin

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] EpikTimer v1.0.1 released

2014-05-28 Thread Graeme Geldenhuys
On 28/05/14 10:16, Michael Schnell wrote:
 So it will be a ZIP file containing a directory with the source code and 
 an lpk file to allow using it as a Lazarus package.

https://github.com/graemeg/epiktimer/releases


 This is OK for me, provided there is a documentation file that briefly 
 explains how to use it within Lazarus (install package) and without 
 (define unit path).

http://wiki.freepascal.org/EpikTimer



G.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] EpikTimer v1.0.1 released

2014-05-28 Thread Tom Lisjac
On Mon, May 26, 2014 at 3:38 AM, Michael Schnell mschn...@lumino.de wrote:


 I use EpikTimer in my (soon to be released) work on the ActiveNoGUI Widget
 Type.

 Here I found, that it is a rather appropriate use for EpikTimer to handle
 it in a static way, not creating an instance of TEpikTimer with every use
 of same, but simply to use class properties, class procedures and class
 functions of TEpikTimer.

 The advantage of this is that the overhead when creating an EpikTimer is
 reduced to zero.


Hi Michael,

I'm having a little trouble understanding where new functionality is needed
for your use case. With the existing code, you don't need to create an
EpikTimer instance each time you need a new timer. A single instance
supports an unlimited number of timers using the TimerData record from the
EpikTimer unit:

TimerData = record
  Running:Boolean; // Timer is currently running
  TimebaseUsed:TimeBaseSelector; // keeps timer aligned with the source
that started it.
  StartTime:TickType; // Ticks sample when timer was started
  TotalTicks:TickType; // Total ticks... for snapshotting and pausing
end;

You can declare any number these records to create as many timers as you
need. Here's an example for a single ET instance of EpikTimer:

Function TimedExecution: Extended;
Var
  i:integer;
  TimerA,TimerB:TimerData;
  TickTick:Array[1..1000] of TimerData; // if you need a thousand timers
Begin
  ET.Clear(TimerA);
  ET.Clear(TimerB); // Declared timers must be cleared before use
  For i:=1 to 1000 do ET.Clear(TickTick[i]);

  ET.Start(TickTick[someindex])

ET.Start(TimerA);
ExecuteTimedSectionA;
ET.Stop (TimerA);

ET.Start(TimerB);
ExecuteTimedSectionB;
ET.Stop (TimerB);

  ET.Stop(TickTick[someindex])
  etc...

The mechanism is pretty efficient as the record for each timer is only a
few dozen bytes. One instance is necessary to do the initialization that
detects the available timebases and does a rough overhead calibration for
system calls. There's always going to be edge jitter with userland calls,
so calibrating each timer wouldn't add certainty to the overall measurement.

If I'm not understanding the problem you're trying to solve, could you
please explain it a little further?

Thanks,

-Tom
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus