On 06/25/2014 04:04 PM, Mattias Gaertner wrote:

Instead it then uses TThread.GetTickCount64. Do you think that is
appropriate at this point in time ?
Yes.
I just checked and found that with fpc vertsion 2.6.0-9, which is the version I installed as a Debian Package for X86-64) TThread does not have
 CurrentThread,
 Queue,   and
 GetTickCount64

I do call thees three in my "interface" unit.

(To do a test with 64 Bit, I hence would need to install and compile the svn version.)



What are the differences between your widgetset and the nogui widgetset?
I'll take a look.

How do you support multiple timer?
I create a pool of timers. (My TTimer class has a class variable holding all Timers created in a dynamic array.) When a timer tick occurs (or when CheckSynchronize returns because of a queued Event), the tick count for the next tick of any timer in the pool is calculated. The resulting period is used as the Timeout parameter for CheckSynchronize().

What scheduler do you use?

In fact none. CheckSynchronize performs the waiting in the main thread and any time base that can read a current tick count (arbitrary frequency) can be used as a timebase.

This Seems like requiring the lowest possible overhead (you know that this is a goal of mine).

To reduce the overhead even more, my TTimer has a class property "Granularity" that allows to define the accuracy of the Timers (in msecs) so that with lower necessary accuracy, events of multiple TTimers will occur at the same time with no system calls in between.

-Michael

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

Reply via email to