-
-
Save sherief/441799a417c66d847e17005c15532187 to your computer and use it in GitHub Desktop.
Get Eorzea Time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <time.h> | |
void GetEorzeaTime(int *eHour, int *eMin) | |
{ | |
/* Get current time */ | |
time_t currentTime; | |
time(¤tTime); | |
/* Convert to Eorzea time */ | |
/* In Eorzea, 12 game minutes = 35 real seconds */ | |
if (eMin) *eMin = (currentTime * 12 / 35) % 60; | |
if (eHour) *eHour = (currentTime * 12 / 35 / 60) % 24; | |
return; | |
} | |
/* | |
void main() | |
{ | |
int hours, minutes; | |
GetEorzeaTime(&hours, &minutes); | |
printf("Eorzea Time %02d:%02d", hours, minutes); | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment