| 58 | } |
| 59 | |
| 60 | void time(Time &time) |
| 61 | { |
| 62 | #if CROWN_PLATFORM_WINDOWS |
| 63 | SYSTEMTIME now; |
| 64 | GetLocalTime(&now); |
| 65 | time.hour = now.wHour; |
| 66 | time.minutes = now.wMinute; |
| 67 | time.seconds = now.wSecond; |
| 68 | #else |
| 69 | time_t t; |
| 70 | struct tm now; |
| 71 | ::time(&t); |
| 72 | localtime_r(&t, &now); |
| 73 | time.hour = now.tm_hour; |
| 74 | time.minutes = now.tm_min; |
| 75 | time.seconds = now.tm_sec; |
| 76 | #endif |
| 77 | } |
| 78 | |
| 79 | void utc_time(Time &time) |
| 80 | { |