How to convert current time to seconds or minutes

Post » Wed Jul 24, 2013 6:42 am

Hi gang,

I need to be able to take the float value of getcurrentgametime() and convert it to minutes, seconds if possible.

I understand that the function returns numbers of days since game started. I understand I can use math.floor to get the number of days by itself. I get the using the integer function would o the same faster.

I also know how to get the current hour of day from the leftover data. I use that in my mod.

But NOWHERE do I find how to convert the original value to total minutes. I need to calculate how many minutes since the game started. One big massive number in minutes only.

I can't figure out how. The numbers left over after removing the days figure do not seem to be seconds. I not know what thy are. Seems to be 400 units for very 20 seconds passed. I tried dividing by 60 to get hours then 60 to get minutes but the results do not make sense.

I am cresting a status mcm window for my mod sands of time, ultimate deadly encounters. I have several heartbeat scripts and need to display if they are still firing by comparing present time last time fired. I need to see if script fired in the last 60 seconds to say a number. I am having the script save the current time it fires to a float. When the mcm menu examines the float variable and sees the value was within the last two minutes it will show script as active.

Help, please ...
User avatar
darnell waddington
 
Posts: 3448
Joined: Wed Oct 17, 2007 10:43 pm

Return to V - Skyrim