Guest User

Untitled

a guest
Nov 24th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. char * Program::Duration( __int32 time )
  2. {
  3. char retval[800];
  4.  
  5. __int32 days, hours, minutes, seconds;
  6.  
  7. seconds = time % 60UL; time /= 60UL;
  8. minutes = time % 60UL; time /= 60UL;
  9. hours = time % 24UL; time /= 24UL;
  10. days = time;
  11.  
  12. sprintf ( retval, "%s days %s hours %s minutes %s seconds", days, hours, minutes, seconds );
  13.  
  14. return retval;
  15. }
Add Comment
Please, Sign In to add comment