Renamed the old geos target to geos-cbm.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5343 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
34
libsrc/geos-cbm/system/systime.c
Normal file
34
libsrc/geos-cbm/system/systime.c
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
/*
|
||||
* systime.c
|
||||
*
|
||||
* Maciej 'YTM/Elysium' Witkowiak, 22.11.2002
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
#include <geos.h>
|
||||
|
||||
time_t _systime(void) {
|
||||
|
||||
struct tm currentTime;
|
||||
|
||||
currentTime.tm_sec = system_date.s_seconds;
|
||||
currentTime.tm_min = system_date.s_minutes;
|
||||
currentTime.tm_hour = system_date.s_hour;
|
||||
currentTime.tm_mday = system_date.s_day;
|
||||
currentTime.tm_mon = system_date.s_month;
|
||||
currentTime.tm_year = system_date.s_year;
|
||||
if (system_date.s_year < 87) {
|
||||
currentTime.tm_year+=100;
|
||||
}
|
||||
currentTime.tm_isdst = -1;
|
||||
|
||||
return mktime(¤tTime);
|
||||
|
||||
}
|
||||
|
||||
clock_t clock(void) {
|
||||
|
||||
return _systime();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user