mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-08 04:29:23 +00:00
Merge pull request #95 from atsampson/master
Add MacTimeToTime to SheepShaver's macos_util.
This commit is contained in:
commit
3cb91cc003
@ -357,6 +357,7 @@ extern uint32 FindLibSymbol(const char *lib, const char *sym); // Find symbol in
|
||||
extern void InitCallUniversalProc(void); // Init CallUniversalProc()
|
||||
extern long CallUniversalProc(void *upp, uint32 info); // CallUniversalProc()
|
||||
extern uint32 TimeToMacTime(time_t t); // Convert time_t value to MacOS time
|
||||
extern time_t MacTimeToTime(uint32 t); // Convert MacOS time to time_t value
|
||||
extern uint32 Mac_sysalloc(uint32 size); // Allocate block in MacOS system heap zone
|
||||
extern void Mac_sysfree(uint32 addr); // Release block occupied by the nonrelocatable block p
|
||||
|
||||
|
@ -339,6 +339,17 @@ uint32 TimeToMacTime(time_t t)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Convert MacOS time to time_t (seconds since 1.1.1970)
|
||||
*/
|
||||
|
||||
time_t MacTimeToTime(uint32 t)
|
||||
{
|
||||
// simply subtract number of seconds between 1.1.1904 and 1.1.1970
|
||||
return t - 2082826800;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Memory allocators in MacOS system heap zone
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user