On 03/31/2014 07:51 PM, Flávio Etrusco wrote:
TTimer in Windows (and the basic timer support in Windows ) is
implemented using window messages and you're not allowing the app to
process messages inside your loop.
This necessity is not limited to Windows nor to TTimer.
Any Object Pascal
On 01/04/2014 09:44, Michael Schnell wrote:
In fact Bob is not doing this (eating up CPU Cycles), but he uses
wait(), which only hampers it's own project.
Actually Bob's wait uses his own TTimer-based code, and is not well
designed.
As Flavio wrote, he would be best to replace all his waits
I use GetTickCount a lot to keep track of timeouts.
On windows, it is guaranteed to be monotonic, so my usual
if GetTickCount-StartTimeTimeout then..
works fine (yes, even when the time wraps around, provided StartTime is
defined as DWORD and Timeout is smaller than a DWORD, of course I could
On 04/01/2014 12:20 PM, Luca Olivetti wrote:
For linux a more accurate implementation could be
function GetTickCount64: QWord;
var
tp: timespec;
begin
clock_gettime(CLOCK_MONOTONIC, @tp);
Result := (Int64(tp.tv_sec) * 1000) + (tp.tv_nsec div 100);
end;
And I say linux because
On Tue, Apr 01, 2014 at 12:45:54PM +0200, zeljko wrote:
On 04/01/2014 12:20 PM, Luca Olivetti wrote:
For linux a more accurate implementation could be
function GetTickCount64: QWord;
var
tp: timespec;
begin
clock_gettime(CLOCK_MONOTONIC, @tp);
Result := (Int64(tp.tv_sec) *
On 04/01/2014 01:57 PM, Henry Vermaak wrote:
On Tue, Apr 01, 2014 at 12:45:54PM +0200, zeljko wrote:
On 04/01/2014 12:20 PM, Luca Olivetti wrote:
For linux a more accurate implementation could be
function GetTickCount64: QWord;
var
tp: timespec;
begin
clock_gettime(CLOCK_MONOTONIC,
On 03/31/2014 01:51 PM, Flávio Etrusco wrote:
...
I guess simply changing your loop to:
+++
repeat
Application.ProcessMessages;
until not timer1.enabled;
+++
should make it work.
That loop will work, but the CPU usage will be 100% and the CPU will run
warm and the battery life
I am using version 1.2~rc2+dfsg-1 and get the following error when trying
to install the LazOpenGLContext 0.0.1 package then Save and Rebuild IDE:
(1,1) Fatal: Can not find unit lazopenglcontext used by Lazarus. Check if
package LazOpenGLContext is in the dependencies.
What steps are
On Tue, 1 Apr 2014 12:27:41 -0400
Anthony Tekatch anth...@unihedron.com wrote:
I am using version 1.2~rc2+dfsg-1
We don't provide such a version. Where did you get that? How did you
install Lazarus?
Do you use gtk1 or gtk2?
What fpc version do you use?
and get the following error when
On Tue, 1 Apr 2014 18:46:26 +0200, Mattias Gaertner nc-gaert...@netcologne.de
wrote:
On Tue, 1 Apr 2014 12:27:41 -0400
Anthony Tekatch anth...@unihedron.com wrote:
I am using version 1.2~rc2+dfsg-1
We don't provide such a version. Where did you get that? How did you
install Lazarus?
On Tue, 01 Apr 2014 12:20:53 +0200
Luca Olivetti l...@wetron.es wrote:
[...]
function GetTickCount64: QWord;
var
tp: timespec;
begin
clock_gettime(CLOCK_MONOTONIC, @tp);
Result := (Int64(tp.tv_sec) * 1000) + (tp.tv_nsec div 100);
end;
[...]
Thanks. GetTickCount64 now uses it on
El 01/04/14 20:03, Mattias Gaertner ha escrit:
On Tue, 01 Apr 2014 12:20:53 +0200
Luca Olivetti l...@wetron.es wrote:
[...]
function GetTickCount64: QWord;
var
tp: timespec;
begin
clock_gettime(CLOCK_MONOTONIC, @tp);
Result := (Int64(tp.tv_sec) * 1000) + (tp.tv_nsec div 100);
On Tue, 1 Apr 2014 13:57:57 -0400
Anthony Tekatch anth...@unihedron.com wrote:
[...]
What version/source of Lazarus do you suggest that I use (which has a
working LazOpenGLContext package)?
See here:
http://wiki.lazarus.freepascal.org/Getting_Lazarus
Mattias
--
On Tue, 1 Apr 2014 20:10:03 +0200, Mattias Gaertner nc-gaert...@netcologne.de
wrote:
On Tue, 1 Apr 2014 13:57:57 -0400
Anthony Tekatch anth...@unihedron.com wrote:
What version/source of Lazarus do you suggest that I use (which has a
working LazOpenGLContext package)?
See here:
That is a great idea Mattias!
a timer with 1 as interval is fast enough for responce application and
slow enough to avoid flickering
Thanks!
-Αρχικό μήνυμα-
From: Mattias Gaertner
Sent: Sunday, March 30, 2014 11:17 PM
To: lazarus@lists.lazarus.freepascal.org
Subject: Re: [Lazarus]
On 01/04/2014 20:43, Chris Crori wrote:
That is a great idea Mattias!
a timer with 1 as interval is fast enough for responce application
and slow enough to avoid flickering
Another very good way to do this, is using Application.QueueAsync
--
___
QueueAsync. Thread safe and multiplatform...
I will look into that Martin, seems like a solution to many problems
Thank you!
-Αρχικό μήνυμα-
From: Martin Frb
Sent: Tuesday, April 01, 2014 11:12 PM
To: Lazarus mailing list
Subject: Re: [Lazarus] Prevent visual updates
On 01/04/2014
QueueAsync works great! Martin you rock! ;)
-Αρχικό μήνυμα-
From: Chris Crori
Sent: Wednesday, April 02, 2014 1:07 AM
To: Lazarus mailing list
Subject: Re: [Lazarus] Prevent visual updates
QueueAsync. Thread safe and multiplatform...
I will look into that Martin, seems like a solution
18 matches
Mail list logo