mirror of
https://github.com/cc65/cc65.git
synced 2024-12-22 12:30:41 +00:00
add clock() to RP6502
This commit is contained in:
parent
8aa59e4af3
commit
2138f3c902
@ -101,6 +101,7 @@ long __fastcall__ ria_call_long_errno (unsigned char op);
|
||||
#define RIA_OP_CODEPAGE 0x03
|
||||
#define RIA_OP_LRAND 0x04
|
||||
#define RIA_OP_STDIN_OPT 0x05
|
||||
#define RIA_OP_CLOCK 0x0F
|
||||
#define RIA_OP_CLOCK_GETRES 0x10
|
||||
#define RIA_OP_CLOCK_GETTIME 0x11
|
||||
#define RIA_OP_CLOCK_SETTIME 0x12
|
||||
|
@ -86,6 +86,8 @@ struct tm {
|
||||
# define CLOCKS_PER_SEC 135 /* FIXME */
|
||||
#elif defined(__GEOS__)
|
||||
# define CLOCKS_PER_SEC 1
|
||||
#elif defined (__RP6502__)
|
||||
# define CLOCKS_PER_SEC 100
|
||||
#elif defined(__TELESTRAT__)
|
||||
# define CLOCKS_PER_SEC 10
|
||||
#elif defined(__ATARI__) || defined (__LYNX__)
|
||||
|
7
libsrc/rp6502/clock.c
Normal file
7
libsrc/rp6502/clock.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include <rp6502.h>
|
||||
#include <time.h>
|
||||
|
||||
clock_t __fastcall__ clock (void)
|
||||
{
|
||||
return ria_call_long (RIA_OP_CLOCK);
|
||||
}
|
Loading…
Reference in New Issue
Block a user