aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2011-09-04 05:04:34 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2011-09-04 05:04:34 +0000
commitcff08ec0f441d031ee9cf24b78911eef48ebda08 (patch)
tree532e4b31e1144653d22d945d42cc44e4fdc87d6d
parentc18b2beaa11c8ac8f5c334e41723dac138de997e (diff)
downloadsrc-cff08ec0f441d031ee9cf24b78911eef48ebda08.tar.gz
src-cff08ec0f441d031ee9cf24b78911eef48ebda08.zip
Since r224036 the cputime and wallclock are supposed to be in seconds,
not microseconds. Make it so. Approved by: re (kib)
Notes
Notes: svn path=/head/; revision=225371
-rw-r--r--sys/kern/kern_rctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_rctl.c b/sys/kern/kern_rctl.c
index a939758bc18d..bf445f6fb945 100644
--- a/sys/kern/kern_rctl.c
+++ b/sys/kern/kern_rctl.c
@@ -908,7 +908,7 @@ rctl_string_to_rule(char *rulestr, struct rctl_rule **rulep)
if (error != 0)
goto out;
if (RACCT_IS_IN_MILLIONS(rule->rr_resource))
- rule->rr_amount *= 1000;
+ rule->rr_amount *= 1000000;
}
if (perstr == NULL || perstr[0] == '\0')
@@ -1223,7 +1223,7 @@ rctl_racct_to_sbuf(struct racct *racct, int sloppy)
continue;
amount = racct->r_resources[i];
if (RACCT_IS_IN_MILLIONS(i))
- amount /= 1000;
+ amount /= 1000000;
sbuf_printf(sb, "%s=%jd,", rctl_resource_name(i), amount);
}
sbuf_setpos(sb, sbuf_len(sb) - 1);