Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char * Program::Duration( __int32 time )
- {
- char retval[800];
- __int32 days, hours, minutes, seconds;
- seconds = time % 60UL; time /= 60UL;
- minutes = time % 60UL; time /= 60UL;
- hours = time % 24UL; time /= 24UL;
- days = time;
- sprintf ( retval, "%s days %s hours %s minutes %s seconds", days, hours, minutes, seconds );
- return retval;
- }
Add Comment
Please, Sign In to add comment