Hi everyone. I am sharing some cross-platform timing I have done, it would
be great to hear from you.
For mac I translated this python implementation to free pascal:
https://github.com/pupil-labs/pyuvc/blob/master/pyuvc-source/darwin_time.pxi
):
```
unit
Sven Barth via fpc-pascal wrote:
I wouldn't introduce a dependency for something like GTK (especially
GTK!) on macOS only to receive some timings. Simpler and more straight
forward to just use the correct functions of the OS.
Of course not, Unless you are doing some cross-development,
On Mon, 1 Jul 2024, Sven Barth via fpc-pascal wrote:
Adriaan van Os via fpc-pascal schrieb am
Sa., 29. Juni 2024, 21:21:
Michael Van Canneyt via fpc-pascal wrote:
Is that a function in the RTL? I can't find it.
No, these are platform-specific functions.
g_get_monotonic_time is
Adriaan van Os via fpc-pascal schrieb am
Sa., 29. Juni 2024, 21:21:
> Michael Van Canneyt via fpc-pascal wrote:
> >> Is that a function in the RTL? I can't find it.
> >
> > No, these are platform-specific functions.
> >
> > g_get_monotonic_time is probably just an alias for the linux/freebsd
> >
Michael Van Canneyt via fpc-pascal wrote:
Is that a function in the RTL? I can't find it.
No, these are platform-specific functions.
g_get_monotonic_time is probably just an alias for the linux/freebsd
unit functions clock_gettime(CLOCK_MONOTONIC_RAW).
g_get_monotonic_time is in glib
On 28/06/2024 14:31, Hairy Pixels via fpc-pascal wrote:
> Thanks I'll check that out. I'm not using Lazarus so tons of dependencies
> won't work
It's a Lazarus package (for convenience), but it doesn't depend on the
LCL. You can use it with pure FPC programs, or even without the Lazarus
package
On 28/06/2024 22:50, Hairy Pixels via fpc-pascal wrote:
> But that's still millisecond precision.
On Windows, Linux and FreeBSD it uses nanosecond precision.
Unfortunately on MacOS, it falls back to RTL's GetTickCount64(), which
as you mentioned, is millisecond precision. It shouldn't be hard to
On Sat, 29 Jun 2024, Hairy Pixels via fpc-pascal wrote:
On Jun 29, 2024, at 5:43 PM, Adriaan van Os wrote:
Hairy Pixels via fpc-pascal wrote:
I had a large function which I was profiling with MilliSecondsBetween but I
split it to be called many different times and now it's not
> On Jun 29, 2024, at 5:43 PM, Adriaan van Os wrote:
>
> Hairy Pixels via fpc-pascal wrote:
>> I had a large function which I was profiling with MilliSecondsBetween but I
>> split it to be called many different times and now it's not accumulating the
>> total time correctly because time is
Hairy Pixels via fpc-pascal wrote:
I had a large function which I was profiling with MilliSecondsBetween but I
split it to be called many different times and now it's not accumulating the
total time correctly because time is being lost to due millisecond precision.
Is there anything in the
> On Jun 28, 2024, at 10:44 PM, Christo Crause wrote:
>
> It is based on TComponent from the RTL classes unit, so no dependency on LCL
> or other Lazarus units. A quick check of the source code suggests that it
> will probably call GetTickCount64
>
On Fri, Jun 28, 2024 at 5:31 PM Hairy Pixels via fpc-pascal <
fpc-pascal@lists.freepascal.org> wrote:
> Thanks I'll check that out. I'm not using Lazarus so tons of dependencies
> won't work but maybe I can learn something. I'm on macOS too so if this is
> using system calls it may not be
Thanks I'll check that out. I'm not using Lazarus so tons of dependencies won't
work but maybe I can learn something. I'm on macOS too so if this is using
system calls it may not be supported.
> On Jun 28, 2024, at 10:10 PM, Christo Crause wrote:
>
>
> On Fri, Jun 28, 2024 at 2:34 PM Hairy
On Fri, Jun 28, 2024 at 2:34 PM Hairy Pixels via fpc-pascal <
fpc-pascal@lists.freepascal.org> wrote:
> I had a large function which I was profiling with MilliSecondsBetween but
> I split it to be called many different times and now it's not accumulating
> the total time correctly because time is
I had a large function which I was profiling with MilliSecondsBetween but I
split it to be called many different times and now it's not accumulating the
total time correctly because time is being lost to due millisecond precision.
Is there anything in the RTL I can use which is more accurate? I
15 matches
Mail list logo