]> git.sur5r.net Git - cc65/blob - libsrc/geos-common/system/systime.c
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / libsrc / geos-common / system / systime.c
1 /*
2  * systime.c
3  *
4  * Maciej 'YTM/Elysium' Witkowiak, 22.11.2002
5  */
6
7 #include <time.h>
8 #include <geos.h>
9
10 time_t _systime(void)
11 {
12     struct tm currentTime;
13
14     currentTime.tm_sec = system_date.s_seconds;
15     currentTime.tm_min = system_date.s_minutes;
16     currentTime.tm_hour = system_date.s_hour;
17     currentTime.tm_mday = system_date.s_day;
18     currentTime.tm_mon = system_date.s_month;
19     currentTime.tm_year = system_date.s_year;
20     if (system_date.s_year < 87) {
21         currentTime.tm_year+=100;
22     }
23     currentTime.tm_isdst = -1;
24
25     return mktime(&currentTime);
26 }
27
28 clock_t clock(void)
29 {
30     return _systime();
31 }