PaladinWhite
Member
Has anyone come up with a clever way to track script execution time? Which is to say, calculate the difference between two times in Mafia?
This works fine, for output in one unit of time (seconds OR minutes OR hours), as long as that unit doesn't roll over during execution:
... but it breaks if, for instance, end_time == 11h55m and end_time == 12h10m.
Anyone got a way to calculate it arbitrarily? Does Mafia have the ability to output the date in milliseconds?
This works fine, for output in one unit of time (seconds OR minutes OR hours), as long as that unit doesn't roll over during execution:
Code:
int start_time = now_to_string(format);
int end_time = now_to_string(format);
int elapsed_time = endtime - starttime;
Anyone got a way to calculate it arbitrarily? Does Mafia have the ability to output the date in milliseconds?