Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void split_time(long total_sec, int *hr, int *min, int *sec) {
- *sec = total_sec;
- for(*hr = 0; *sec > 3600; ++*hr, *sec -= 3600){}
- for(*min = 0; *sec > 60; ++*min, *sec -= 60){}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement