1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-07 04:29:01 +00:00
cc65/libsrc/rp6502/gettimespec.c

14 lines
326 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_gettimespec (struct timespec* ts, unsigned char op)
2023-11-17 02:46:16 +00:00
/* Internal method shared by clock_getres and clock_gettime. */
{
2023-11-17 19:08:51 +00:00
int ax = ria_call_int_errno (op);
if (ax >= 0) {
ts->tv_sec = ria_pop_long ();
ts->tv_nsec = ria_pop_long ();
2023-11-17 02:46:16 +00:00
}
return ax;
}