Commit Graph

123 Commits

Author SHA1 Message Date
auronandace fd09491c4a apply ignored_unit_patterns clippy lint 2026-06-11 14:00:24 +01:00
auronandace 9ea36a0c6c verify POSIX header includes 2026-06-08 18:27:53 +01:00
lyw458372 7d8cd46131 chore: delete dead code 2026-06-08 19:41:49 +08:00
lyw458372 8e11d7af70 fix: mktime: stop using tm_gmtoff, use system timezone per POSIX 2026-06-08 19:39:06 +08:00
auronandace 4f5d535ebc split out NULL from stddef header 2026-06-02 16:56:12 +01:00
auronandace 4fd346c9d6 verify langinfo header includes 2026-06-01 09:27:09 +01:00
sourceturner 4b4dc2ce94 implement housekeeping for posix timers 2026-05-24 19:14:02 +02:00
sourceturner 843449130a fix wrong null checks
while it is true that timer_t is implemented as a pointer,
this does not mean that timer_t cannot be 0.
actually, on linux, the first timer created seems to have
a timer_t value of 0 by default
2026-05-24 19:12:05 +02:00
Wildan M 90676dcf04 Add %x support to strftime 2026-05-21 06:52:01 +07:00
Wildan M 4a7f2d80ff Avoid StringWriter cast and string format 2026-05-20 09:10:25 +07:00
auronandace 933190e37c remove sys_types from time header includes 2026-05-15 14:58:20 +01:00
Speedy_Lex 2d4ab41de5 Cargo fmt 2026-05-07 00:05:13 +02:00
Speedy_Lex eff610eac6 Fix many clippy lints 2026-05-07 00:05:07 +02:00
auronandace 1edd7a63d7 verify time header includes 2026-05-04 09:05:32 +01:00
auronandace 05b8ffbcb7 import timespec from time rather than bits 2026-05-03 14:33:39 +01:00
Wildan M ea667cdca1 Support disarming timer 2026-05-03 05:06:25 +07:00
Wildan M 9188a9e354 Make timer_internal_t atomic 2026-05-03 05:02:29 +07:00
Wildan M d16dfade59 Use less cloning for timespec 2026-05-03 03:21:06 +07:00
Wildan M 7b0354ca3d Use type casts for timespec conversion 2026-05-03 03:09:52 +07:00
sourceturner 1f584a3943 replace deprecated NaiveDateTime::from_timestamp 2026-04-20 21:37:52 +00:00
sourceturner 4ffd337b9b add #[allow(deprecated)] annotations
allow using deprecated functions and data structures
in deprecated functions
2026-04-20 21:37:52 +00:00
Peter Limkilde Svendsen 31a703144d Describe safety requirements for gmtime(_r) and localtime(_r) 2026-04-13 06:43:07 -06:00
auronandace 49f96a96e6 rename bits_time to bits_timespec for consistency 2026-04-09 10:50:04 +01:00
Zero aca4df91cf feat(time): Add process_pid to timer_internal_t
Add `process_pid` field to `timer_internal_t` struct.
This field is used by the `alarm()` function to specify the PID of the process
to which the `SIGALRM` signal should be delivered.
2026-03-31 00:19:35 +02:00
auronandace 8a2bfa2ed5 tackle some lints 2026-03-10 18:20:06 +00:00
auronandace 1db7abb2d3 time header cleanup 2026-02-27 18:14:51 +00:00
Jeremy Soller acc32bb019 Merge branch 'fix-parse_xxx' into 'master'
fix: handle char boundary in `parse_weekday` and `parse_month`

Closes #265

See merge request redox-os/relibc!990
2026-02-24 08:14:10 -07:00
auronandace bc25b5a7ed add export renames to cbindgen files 2026-02-12 13:33:54 +00:00
auronandace 1191d8e1b4 extract timespec to a bits header 2026-02-12 13:07:24 +00:00
auronandace 7d1582a555 add unused_imports lint 2026-02-10 15:55:32 +00:00
Marsman 7de04a217b fix: handle char boundary in parse_weekday and parse_month 2026-02-10 13:17:40 +00:00
auronandace c3f3e051e1 add unused-unsafe lint 2026-02-08 15:39:48 +00:00
auronandace 130231d6b4 add irrefutable_let_patterns lint 2026-02-07 16:50:19 +00:00
auronandace e69d399654 remove duplicate constant 2026-02-01 08:37:48 +00:00
auronandace b027b77dbf widen unsafe blocks to fix tzset test 2026-01-28 20:56:29 +00:00
sourceturner defd2ce7c3 Deny deny-unsafe_op_in_unsafe_fn on the crate level 2026-01-21 00:41:57 +01:00
sourceturner 2cf1a2d16a Use unsafe blocks in time.h implementation 2026-01-18 21:22:57 +01:00
Wildan M 9789af36f0 Put timespec convert into common fn 2026-01-07 00:07:50 +07:00
Wildan M fab87ae2d8 Fix i586 compilation and add more checks 2026-01-06 15:56:57 +07:00
Wildan M 242ed32b42 Implement pthread_cond_timedwait futex properly 2026-01-06 15:33:58 +07:00
auronandace 911c36ecd3 time and utime header cleanup 2025-12-31 15:54:25 +00:00
Jeremy Soller 3765148270 Fix incompatible functions 2025-12-19 12:55:43 -07:00
Wildan M e2f8eb43a6 Reduce logs on openlibm and warning on time.h 2025-12-19 15:06:20 +07:00
Anhad Singh eb4ce618e2 fix(header/time): define TIME_UTC
Workaround for a bug inside `cbindgen`. For some reason it does not like
us exporting constants that depend on other constants that are *not*
defined as a part of the same module.
2025-12-09 01:13:22 +11:00
auronandace 27bd869119 mark timespec_get and timespec_getres as unsafe and annotate no mangle 2025-12-07 21:07:49 +00:00
Josh Megnauth 4538fdb0c9 Implement timespec_get and timespec_getres
`timespec_get` and `timespec_getres` are both C23 functions. They're
similar to the POSIX functions `clock_gettime` and `clock_getres`, but
both sets of functions define extra, exclusive features. I didn't
implement the extra features yet, partially because Redox doesn't seem
to support them yet either.
2025-12-04 20:38:35 +00:00
Wildan M c8fce67873 Support SIGEV_SIGNAL and TIMER_ABSTIME 2025-10-16 22:37:24 +07:00
Wildan Mubarok 2efcd20fbc Implement POSIX timer functions 2025-10-15 08:10:06 -06:00
Jeremy Soller 82084440ad Support nightly-2025-10-03 2025-10-03 21:51:10 -06:00
Jacob Lorentzon 9c5f11fbc8 Add Out<T> wrapper 2025-09-21 14:36:12 +02:00