mirror of
https://github.com/cc65/cc65.git
synced 2024-12-31 11:32:00 +00:00
Set the clock id to CLOCK_REALTIME when calling clock_gettime.
Previously, time() allocated stack space for the clock id argument, but didn't actually set a value.
This commit is contained in:
parent
4e2a3bde92
commit
838c8b48b7
@ -66,3 +66,9 @@
|
|||||||
.global _clock_settime
|
.global _clock_settime
|
||||||
.global _localtime
|
.global _localtime
|
||||||
.global _mktime
|
.global _mktime
|
||||||
|
|
||||||
|
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
; Constants
|
||||||
|
|
||||||
|
CLOCK_REALTIME = 0
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
.export _time
|
.export _time
|
||||||
|
|
||||||
.import decsp1, ldeaxi
|
.import pusha, ldeaxi
|
||||||
.importzp ptr1, sreg, tmp1, tmp2
|
.importzp ptr1, sreg, tmp1, tmp2
|
||||||
|
|
||||||
.include "time.inc"
|
.include "time.inc"
|
||||||
@ -22,7 +22,8 @@
|
|||||||
|
|
||||||
; Get the time (machine dependent)
|
; Get the time (machine dependent)
|
||||||
|
|
||||||
jsr decsp1
|
lda #CLOCK_REALTIME
|
||||||
|
jsr pusha
|
||||||
lda #<time
|
lda #<time
|
||||||
ldx #>time
|
ldx #>time
|
||||||
jsr _clock_gettime
|
jsr _clock_gettime
|
||||||
|
Loading…
Reference in New Issue
Block a user