forked from pyrite-dev/milsko
update time.c to not do a cast
This commit is contained in:
parent
b2ce5597b0
commit
5ca241ad0a
2 changed files with 3 additions and 3 deletions
|
|
@ -314,8 +314,6 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Retro")
|
||||||
PRIVATE
|
PRIVATE
|
||||||
src/backend/classicmacos.c
|
src/backend/classicmacos.c
|
||||||
)
|
)
|
||||||
if(PLATFORM MATCHES retroppc)
|
|
||||||
endif()
|
|
||||||
if(PLATFORM MATCHES retroppc)
|
if(PLATFORM MATCHES retroppc)
|
||||||
set_target_properties(Mw PROPERTIES COMPILE_FLAGS "-ffunction-sections -mcpu=601 -Os -Wall -Wextra -Wno-unused-parameter")
|
set_target_properties(Mw PROPERTIES COMPILE_FLAGS "-ffunction-sections -mcpu=601 -Os -Wall -Wextra -Wno-unused-parameter")
|
||||||
set_target_properties(Mw PROPERTIES LINK_FLAGS "-Wl,-gc-sections")
|
set_target_properties(Mw PROPERTIES LINK_FLAGS "-Wl,-gc-sections")
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ void timerUpdateFunc(void) {
|
||||||
long MwTimeGetTick(void) {
|
long MwTimeGetTick(void) {
|
||||||
UnsignedWide h;
|
UnsignedWide h;
|
||||||
Microseconds(&h);
|
Microseconds(&h);
|
||||||
return *(long*)&h;
|
return h.lo;
|
||||||
}
|
}
|
||||||
void MwTimeSleep(int ms) {
|
void MwTimeSleep(int ms) {
|
||||||
tm.tmAddr = NewTimerProc(timerUpdateFunc);
|
tm.tmAddr = NewTimerProc(timerUpdateFunc);
|
||||||
|
|
@ -52,6 +52,8 @@ void MwTimeSleep(int ms) {
|
||||||
|
|
||||||
InsTime((QElemPtr)&tm);
|
InsTime((QElemPtr)&tm);
|
||||||
PrimeTime((QElemPtr)&tm, 1);
|
PrimeTime((QElemPtr)&tm, 1);
|
||||||
|
|
||||||
|
DisposeTimerUPP(tm.tmAddr);
|
||||||
}
|
}
|
||||||
#elif defined(__unix__)
|
#elif defined(__unix__)
|
||||||
long MwTimeGetTick(void) {
|
long MwTimeGetTick(void) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue