Re: [Lazarus] Cannot compile EpikTimer

2014-09-06 Thread Marco van de Voort
On Sat, Sep 06, 2014 at 08:14:21AM +0100, Graeme Geldenhuys wrote:
> I was thinking of that too afterwards. Though I don't have access to 
> Open/NetBSD systems, so not sure how compatible it is with FreeBSD.

In general very, but with some exceptions and sometimes a bit of time
between introduction of a feature over all flavors. 

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


Re: [Lazarus] Cannot compile EpikTimer

2014-09-06 Thread Graeme Geldenhuys



On Saturday 06/09/2014 at 00:38, Marco van de Voort  wrote:


I committed it, since the patch itself was ok. Maybe it should have 
been
attempted to come to one implementation for free/open/net in bsd.pas 
though.


I was thinking of that too afterwards. Though I don't have access to 
Open/NetBSD systems, so not sure how compatible it is with FreeBSD.


What I was hinting above maybe the sysutils code should use 
MONOTONIC_FAST,
not MONOTONIC on FreeBSD. Granularity worsens, but performnace 
improves.


It depends on what the sysutils routine is supposed to favor.


Ah, I see what you mean.  I'll look into this and do a few more tests.


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


Re: [Lazarus] Cannot compile EpikTimer

2014-09-05 Thread Marco van de Voort
On Fri, Sep 05, 2014 at 05:55:46PM +0100, Graeme Geldenhuys wrote:
> > OS. (e.g. freebSD MONOTONIC vs MONOTONIC_FAST, the latter I'd expect 
> > in a
> > gettickcount)
> 
> 
> Did you see my patch in FPC Mantis regarding this?  If it's not 100% 
> correct (I'm a total newbie when it comes to compiler development), 
> hopefully it is at least a good starting point to implement this in 
> FreeBSD. Any feedback would be appreciated.

I committed it, since the patch itself was ok. Maybe it should have been
attempted to come to one implementation for free/open/net in bsd.pas though.

What I was hinting above maybe the sysutils code should use MONOTONIC_FAST,
not MONOTONIC on FreeBSD. Granularity worsens, but performnace improves.

It depends on what the sysutils routine is supposed to favor.

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


Re: [Lazarus] Cannot compile EpikTimer

2014-09-05 Thread Graeme Geldenhuys



On Friday 05/09/2014 at 14:17, Marco van de Voort  wrote:


Trouble is that monotonic clock support is an optional part of the 
standard,
AND the cheapness/accurancy tradeoffs of the same constants may vary 
with
OS. (e.g. freebSD MONOTONIC vs MONOTONIC_FAST, the latter I'd expect 
in a

gettickcount)



Did you see my patch in FPC Mantis regarding this?  If it's not 100% 
correct (I'm a total newbie when it comes to compiler development), 
hopefully it is at least a good starting point to implement this in 
FreeBSD. Any feedback would be appreciated.


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


Re: [Lazarus] Cannot compile EpikTimer

2014-09-05 Thread Marco van de Voort
On Tue, Sep 02, 2014 at 07:00:49PM +0100, Graeme Geldenhuys wrote:
> It seems FPC it out of date then. Because clock_gettime is a POSIX.1 
> standard, and FreeBSD has support for it.

Trouble is that monotonic clock support is an optional part of the standard,
AND the cheapness/accurancy tradeoffs of the same constants may vary with
OS. (e.g. freebSD MONOTONIC vs MONOTONIC_FAST, the latter I'd expect in a
gettickcount)
 

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


Re: [Lazarus] Cannot compile EpikTimer

2014-09-02 Thread Graeme Geldenhuys



On Tuesday 02/09/2014 at 15:30, Mattias Gaertner  wrote:


clock_gettime is defined in unit Linux.


It seems FPC it out of date then. Because clock_gettime is a POSIX.1 
standard, and FreeBSD has support for it.


 http://www.freebsd.org/cgi/man.cgi?query=clock_gettime

I'll file a bug report on Mantis if one doesn't already exist.




Regards,
 - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/



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


Re: [Lazarus] Cannot compile EpikTimer

2014-09-02 Thread Xiangrong Fang
Thanks, this worked.  I added unit Linux in here:

{$IFDEF Windows}
  Windows, MMSystem,
{$ELSE}
  unix, unixutil, baseunix, *Linux*,
{$ENDIF}

Should this be considered a minor bug in epiktimer's platform dependant
code?

Xiangrong


2014-09-02 22:28 GMT+08:00 Mattias Gaertner :

> On Tue, 2 Sep 2014 22:18:38 +0800
> Xiangrong Fang  wrote:
>
> > Hi All,
> >
> > While trying to install epiktimer following this wiki page:
> >
> > http://wiki.lazarus.freepascal.org/EpikTimer
> >
> > I got this error:
> >
> > /home/xrfang/git/epiktimer/epiktimer.pas(403,29) Error: Identifier not
> > found "clock_gettime"
>
> clock_gettime is defined in unit Linux.
>
> > I am running Lazarus 1.2.4/FPC2.6.2 on Ubuntu 14.10 64bit.
>
> Mattias
>
> --
> ___
> 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] Cannot compile EpikTimer

2014-09-02 Thread Mattias Gaertner
On Tue, 2 Sep 2014 22:18:38 +0800
Xiangrong Fang  wrote:

> Hi All,
> 
> While trying to install epiktimer following this wiki page:
> 
> http://wiki.lazarus.freepascal.org/EpikTimer
> 
> I got this error:
> 
> /home/xrfang/git/epiktimer/epiktimer.pas(403,29) Error: Identifier not
> found "clock_gettime"

clock_gettime is defined in unit Linux.

> I am running Lazarus 1.2.4/FPC2.6.2 on Ubuntu 14.10 64bit.

Mattias

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


[Lazarus] Cannot compile EpikTimer

2014-09-02 Thread Xiangrong Fang
Hi All,

While trying to install epiktimer following this wiki page:

http://wiki.lazarus.freepascal.org/EpikTimer

I got this error:

/home/xrfang/git/epiktimer/epiktimer.pas(403,29) Error: Identifier not
found "clock_gettime"

I am running Lazarus 1.2.4/FPC2.6.2 on Ubuntu 14.10 64bit.

Any ideas?

Thanks a lot.

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