mirror of
https://github.com/open-simh/simh.git
synced 2026-05-04 07:08:55 +00:00
3b2: Use localtime instead of localtime_r
This commit is contained in:
@@ -750,7 +750,7 @@ void tod_resync()
|
|||||||
sec = now.tv_sec - td->delta;
|
sec = now.tv_sec - td->delta;
|
||||||
|
|
||||||
/* Populate the tm struct based on current sim_time */
|
/* Populate the tm struct based on current sim_time */
|
||||||
localtime_r(&sec, &tm);
|
tm = *localtime(&sec);
|
||||||
|
|
||||||
td->tsec = 0;
|
td->tsec = 0;
|
||||||
td->unit_sec = tm.tm_sec % 10;
|
td->unit_sec = tm.tm_sec % 10;
|
||||||
@@ -797,7 +797,7 @@ void tod_update_delta()
|
|||||||
}
|
}
|
||||||
tm.tm_isdst = 0;
|
tm.tm_isdst = 0;
|
||||||
ssec = mktime(&tm);
|
ssec = mktime(&tm);
|
||||||
td->delta = now.tv_sec - ssec;
|
td->delta = (int32)(now.tv_sec - ssec);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 tod_read(uint32 pa, size_t size)
|
uint32 tod_read(uint32 pa, size_t size)
|
||||||
|
|||||||
Reference in New Issue
Block a user