Commit Graph
6 Commits
Author SHA1 Message Date
waozi 37a64372a6 Add target-aware package application APIs 2026-11-13 04:20:48 -03:00
waozi 7442b5886f Use native Windows clocks for shared account and package hosts 2026-10-22 19:18:27 -03:00
waozi a677e9530b Read the clock with Emscripten's 64-bit time_t in web builds
On wasm32 Emscripten's time_t is 64-bit while long stays 32-bit. The
pointer-sized time() binding was a linker signature mismatch that trapped
on the first call, so a web page reading the local time froze (Werkzeug's
Clock), and clock_gettime wrote a 16-byte timespec into an 8-byte struct,
leaving the monotonic clock at whole seconds. PLATFORM_WEB builds now use
64-bit seconds and Emscripten's timespec layout. tests/date_time_linux.sh
checks both modules' layouts against Emscripten's time.h, links with fatal
linker warnings and runs the clocks under node when emcc is available.
2026-10-13 23:23:06 -03:00
waozi 55cc0ed26e Read the monotonic clock with long-sized fields on 32-bit Android
std/timer_linux declared struct timespec with two s64 fields, but time_t
and long are 32-bit on armeabi-v7a. MonotonicMilliseconds read garbage or
-1 there, so a Moto e6 play app polled every frame and timed gestures
wrongly. ClockValue now uses isize, which lowers to a pointer-sized C type
like long on Linux and Android. tests/timer_linux.sh checks the layout
against struct timespec, also for armv7a and aarch64 Android when
ZIRAN_THREAD_ANDROID_NDK is set; the self-test passed on the Moto.
2026-10-10 16:16:47 -03:00
waozi aaaa4cb3c3 Expose nanosecond monotonic timing for native profiling 2026-10-07 17:23:19 -03:00
waozi a55b130b1b Add bounded queues and monotonic timers 2026-09-29 14:27:41 -03:00