From efa2020d932e645de0fa21af4c36db16654ff0b4 Mon Sep 17 00:00:00 2001 From: Kugel Fuhr <98353208+kugelfuhr@users.noreply.github.com> Date: Thu, 12 Sep 2024 09:14:57 +0200 Subject: [PATCH] Improved/fixed the time() function: - When the underlying clock_gettime function returned an error, the value returned via *timep was wrong. - Reduced code size by 7 bytes. - Don't suck in ldeaxi. --- libsrc/common/time.s | 51 ++++++++++++++++-------------------- test/val/time-test2.c | 61 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 28 deletions(-) create mode 100644 test/val/time-test2.c diff --git a/libsrc/common/time.s b/libsrc/common/time.s index 36fd36323..4092e71c6 100644 --- a/libsrc/common/time.s +++ b/libsrc/common/time.s @@ -22,55 +22,50 @@ ; Get the time (machine dependent) + .assert timespec::tv_sec = 0, error lda #CLOCK_REALTIME jsr pusha lda #