Jul 24, 2011 at 6:05am UTC
im using the TimeGetTime function, it works great but i have a question, when i set a variable as timegettime how would i turn that value into minutes or even seconds?
Last edited on Jul 24, 2011 at 6:34am UTC
Jul 24, 2011 at 6:55am UTC
Never heard of that function, it must be a Microsoft one. Assuming it returns the time in milliseconds.
TimeGetTime() / 1000; //Seconds
TimeGetTime() / 1000 / 60; //Minutes
TimeGetTime() / 1000 / 60 / 60; //Hours
TimeGetTime() / 1000 / 60 / 24; //Days
You can also use % modulus to get a certain digit from the result.
130 % 100 = 30
130 % 20 = 10
Basically what is the remainder after you've divided the value from it as many times as possible.
Last edited on Jul 24, 2011 at 7:06am UTC