Commit graph

6 commits

Author SHA1 Message Date
Christoph M. Becker
107bd080a5
Fix Clang style nits (GH-17685)
This addresses all `-Wlogical-op-parentheses` and `-Wmissing-braces`
warnings across the whole code base (all Windows specific code).
2025-02-05 14:13:56 +01:00
Jorg Adam Sowa
ac2ce94de0
zend_hrtime: Fix build for macOS without clock_gettime_nsec_np() (#17437) 2025-01-16 18:57:51 +01:00
Tim Düsterhus
85f69a7a3f
zend_hrtime: Use clock_gettime_nsec_np() for macOS if available (#17089)
As per the Apple developer documentation:

> Prefer to use the equivalent clock_gettime_nsec_np(CLOCK_UPTIME_RAW) in
> nanoseconds.

and also

> This API has the potential of being misused to access device signals to try
> to identify the device or user, also known as fingerprinting. Regardless of
> whether a user gives your app permission to track, fingerprinting is not
> allowed. When you use this API in your app or third-party SDK (an SDK not
> provided by Apple), declare your usage and the reason for using the API in
> your app or third-party SDK’s PrivacyInfo.xcprivacy file.

see https://developer.apple.com/documentation/kernel/1462446-mach_absolute_time
2024-12-10 12:19:41 +01:00
Bob Weinand
6c4e3c0f52
Use ZEND_API in zend_hrtime (#13288)
This allows actually calling zend_hrtime() from extensions on Windows.

Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
2024-03-17 03:09:08 +01:00
Peter Kokot
b132b7ab7e
Remove check for time.h and HAVE_TIME_H (#11726)
The `<time.h>` header file is part of the standard C89 headers [1] and
on current systems can be included unconditionally.

The conditional include based on Windows is there so the win32/time.h
can be included on other places when needed.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2023-07-20 09:38:53 +02:00
Arnaud Le Blanc
d0731934b7
Expose time spent collecting cycles in gc_status() (#11523) 2023-07-16 12:34:28 +02:00