[fpc-pascal] Sub-millisecond time measuring

Sven Barth pascaldragon at googlemail.com
Mon Jul 1 11:16:27 CEST 2024


Adriaan van Os via fpc-pascal <fpc-pascal at lists.freepascal.org> 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
> > unit functions clock_gettime(CLOCK_MONOTONIC_RAW).
>
> g_get_monotonic_time is in glib <
> https://docs.gtk.org/glib/func.get_monotonic_time.html>
>
>   function g_get_monotonic_time: gint64; cdecl; external;
>
> but it requires a bug fix when using gtk on MacOSX <
> https://bugzilla.gnome.org/show_bug.cgi?id=728123>
>

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.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20240701/4128feeb/attachment.htm>


More information about the fpc-pascal mailing list