1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-01 13:41:34 +00:00
cc65/libsrc/rp6502/gettimezone.c

16 lines
361 B
C
Raw Normal View History

2023-11-17 02:46:16 +00:00
#include <rp6502.h>
#include <time.h>
2023-11-17 19:08:51 +00:00
int clock_gettimezone (clockid_t clock_id, struct _timezone* tz)
2023-11-17 02:46:16 +00:00
{
int ax;
2023-11-17 19:08:51 +00:00
ria_set_ax (clock_id);
ax = ria_call_int_errno (RIA_OP_CLOCK_GETTIMEZONE);
if (ax >= 0) {
2023-11-17 02:46:16 +00:00
char i;
2023-11-17 19:08:51 +00:00
for (i = 0; i < sizeof (struct _timezone); i++)
((char*)tz)[i] = ria_pop_char ();
2023-11-17 02:46:16 +00:00
}
return ax;
}