Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2016-03

TFPTimer wtih timer_create

6 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Fabio Luis Girardi

Hi all!

I'm searching a way to implement a TFPTimer that don't uses threads. On Linux and FreeBSD I found the timer_create and family functions. My question is: What these functions has wrong?
Or the use of these functions should be avoided? Or because simply nobody want to do that?

The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com
Michael Van Canneyt
to Fabio Luis Girardi
Fabio Luis Girardi wrote 5 lines
Hi all! I'm searching a way to implement a TFPTimer that don't uses threads. On Linux and FreeBSD I found the timer_create and family functions. My question is: What these functions has wrong?

Nothing except that they are not cross platform.

Or the use of these functions should be avoided? Or because simply nobody want to do that?

No, a unix-only TFPTimer driver using these functions can be implemented if you so wish it.

I would definitely accept patches for it.

Michael.

Fabio Luis Girardi
to Michael Van Canneyt

Lazarus/Freepascal has some config to ignore a signal?

2016-03-05 15:34 GMT-03:00 Michael Van Canneyt :

Show quoted text 24 lines
On Sat, 5 Mar 2016, Fabio Luis Girardi wrote: Hi all! > > I'm searching a way to implement a TFPTimer that don't uses threads. On > Linux and FreeBSD I found the timer_create and family functions. My > question is: What these functions has wrong? > Nothing except that they are not cross platform. Or the use of these functions should be avoided? Or because simply nobody > want to do that? > No, a unix-only TFPTimer driver using these functions can be implemented if you so wish it. I would definitely accept patches for it. Michael.
The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com
Michael Van Canneyt
to Fabio Luis Girardi
Fabio Luis Girardi wrote
Lazarus/Freepascal has some config to ignore a signal?

No, you must install this yourself using the unix,baseunix units.

Michael.

Show quoted text 38 lines
2016-03-05 15:34 GMT-03:00 Michael Van Canneyt : > > > On Sat, 5 Mar 2016, Fabio Luis Girardi wrote: > > Hi all! >> >> I'm searching a way to implement a TFPTimer that don't uses threads. On >> Linux and FreeBSD I found the timer_create and family functions. My >> question is: What these functions has wrong? >> > > Nothing except that they are not cross platform. > > Or the use of these functions should be avoided? Or because simply nobody >> want to do that? >> > > No, a unix-only TFPTimer driver using these functions can be implemented > if you so wish it. > > I would definitely accept patches for it. > > Michael. > -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com
Fabio Luis Girardi
to Michael Van Canneyt

Hi again!

I'm still fighting with timers on Linux, and due a lot of "problems" using timer_create and signals on Lazarus, I decided to change my implementation to to user timerfd_create. My current question is: TApplication has some mechanism that check periodically changes in a file descriptor?

2016-03-05 17:58 GMT-03:00 Michael Van Canneyt :

Show quoted text 55 lines
On Sat, 5 Mar 2016, Fabio Luis Girardi wrote: Lazarus/Freepascal has some config to ignore a signal? > No, you must install this yourself using the unix,baseunix units. Michael. > > 2016-03-05 15:34 GMT-03:00 Michael Van Canneyt : > > >> >> On Sat, 5 Mar 2016, Fabio Luis Girardi wrote: >> >> Hi all! >> >>> >>> I'm searching a way to implement a TFPTimer that don't uses threads. On >>> Linux and FreeBSD I found the timer_create and family functions. My >>> question is: What these functions has wrong? >>> >>> >> Nothing except that they are not cross platform. >> >> Or the use of these functions should be avoided? Or because simply nobody >> >>> want to do that? >>> >>> >> No, a unix-only TFPTimer driver using these functions can be implemented >> if you so wish it. >> >> I would definitely accept patches for it. >> >> Michael. >> >> > > > -- > The best regards, > > Fabio Luis Girardi > PascalSCADA Project > http://sourceforge.net/projects/pascalscada > http://www.pascalscada.com > > _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com
Fabio Luis Girardi
to Fabio Luis Girardi

Please ignore, I found this: http://wiki.freepascal.org/Main_Loop_Hooks

2016-03-10 17:59 GMT-03:00 Fabio Luis Girardi :

Show quoted text 76 lines
Hi again! I'm still fighting with timers on Linux, and due a lot of "problems" using timer_create and signals on Lazarus, I decided to change my implementation to to user timerfd_create. My current question is: TApplication has some mechanism that check periodically changes in a file descriptor? 2016-03-05 17:58 GMT-03:00 Michael Van Canneyt : > > > On Sat, 5 Mar 2016, Fabio Luis Girardi wrote: > > Lazarus/Freepascal has some config to ignore a signal? >> > > No, you must install this yourself using the unix,baseunix units. > > Michael. > >> >> 2016-03-05 15:34 GMT-03:00 Michael Van Canneyt : >> >> >>> >>> On Sat, 5 Mar 2016, Fabio Luis Girardi wrote: >>> >>> Hi all! >>> >>>> >>>> I'm searching a way to implement a TFPTimer that don't uses threads. On >>>> Linux and FreeBSD I found the timer_create and family functions. My >>>> question is: What these functions has wrong? >>>> >>>> >>> Nothing except that they are not cross platform. >>> >>> Or the use of these functions should be avoided? Or because simply >>> nobody >>> >>>> want to do that? >>>> >>>> >>> No, a unix-only TFPTimer driver using these functions can be implemented >>> if you so wish it. >>> >>> I would definitely accept patches for it. >>> >>> Michael. >>> >>> >> >> >> -- >> The best regards, >> >> Fabio Luis Girardi >> PascalSCADA Project >> http://sourceforge.net/projects/pascalscada >> http://www.pascalscada.com >> >> _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal > -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com
The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com