aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/blogc/rusage.c2
-rw-r--r--src/blogc/rusage.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/blogc/rusage.c b/src/blogc/rusage.c
index 6d88dc4..a38848d 100644
--- a/src/blogc/rusage.c
+++ b/src/blogc/rusage.c
@@ -48,7 +48,7 @@ char*
blogc_rusage_format_cpu_time(long long time)
{
if (time >= 1000000)
- return bc_strdup_printf("%.3s", ((float) time) / 1000000.0);
+ return bc_strdup_printf("%.3fs", ((float) time) / 1000000.0);
// this is a special case: some systems may report the cpu time rounded up to the
// milisecond. it is useless to show ".000" in this case.
diff --git a/src/blogc/rusage.h b/src/blogc/rusage.h
index 3441630..6344066 100644
--- a/src/blogc/rusage.h
+++ b/src/blogc/rusage.h
@@ -13,9 +13,11 @@
#include <config.h>
#endif /* HAVE_CONFIG_H */
+#ifdef HAVE_SYS_TIME_H
#ifdef HAVE_SYS_RESOURCE_H
#define HAVE_RUSAGE 1
-#endif /* HAVE_SYS_RESOURCE_H */
+#endif
+#endif
#include "../common/utils.h"