1 #include "sysconfig.h" 2 #include "sysdeps.h" 3 4 #include "uae.h" 5 #include "uae/fs.h" 6 7 #include <time.h> 8 #include <fs/base.h> 9 #include <fs/time.h> 10 11 int64_t g_uae_epoch = 0; 12 13 static struct tm g_amiga_time; 14 15 // using a global variable, this function should be access only 16 // from the emulation thread 17 uae_get_amiga_time()18struct tm *uae_get_amiga_time() { 19 //printf("uae_get_amiga_time\n"); 20 21 if (uae_deterministic_mode()) { 22 // FIXME: get synchronized clock here 23 time_t t = 0; 24 #ifdef DEBUG_SYNC 25 write_sync_log("uae_get_amiga_time: (fixed to %d)\n", 0); 26 #endif 27 fs_gmtime_r(&t, &g_amiga_time); 28 } 29 else { 30 time_t t = time(NULL); 31 //t += currprefs.cs_rtc_adjust; 32 fs_localtime_r(&t, &g_amiga_time); 33 //printf("returning year %d\n", g_local_time->tm_year); 34 } 35 return &g_amiga_time; 36 } 37 38 // added for WinUAE 2.5.0 beta 21 merge 39 getlocaltime(void)40uae_u32 getlocaltime (void) 41 { 42 // check src/od-win32/posixemu.cpp 43 STUB(""); 44 return 0; 45 } 46