Jump to content
Sign in to follow this  
R34P3R

convert seconds into timestring MM:SS ?

Recommended Posts

Hey guys. i need to convert seconds into min:sec string..

i know how i get the minutes but how did i get the current seconds ?

Thanks a lot.

_bombTime = time + 300; // in seconds

_curBombtime = _bombTime - time;

_bmin = floor(_curBombtime / 60);
if (_bmin < 10) then {_bmin = format["0%1",_bmin]};

_bsec = ????  :D

Share this post


Link to post
Share on other sites

as Sniperwolf572 said, use modulo (%). Modulo return the rest of a division

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×