- compile fix

svn path=/trunk/boinc/; revision=25663
This commit is contained in:
David Anderson 2012-05-09 18:24:54 +00:00
parent 24c0fcc9bf
commit 7e16deb790
1 changed files with 9 additions and 8 deletions

View File

@ -212,12 +212,13 @@ int ndays_to_string (double x, int smallest_timescale, char *buf) {
}
// convert seconds into a string "0h00m00s00"
void secs_to_hmsf(double secs, char*buf) {
uint s = secs;
uint f = (secs - s) * 100.0;
uint h = s / 3600;
//
void secs_to_hmsf(double secs, char* buf) {
int s = secs;
int f = (secs - s) * 100.0;
int h = s / 3600;
s -= h * 3600;
uint m = s / 60;
int m = s / 60;
s -= m * 60;
sprintf(buf, "%uh%02um%02us%02u", h, m, s, f);
}