From 7bf411e4f60e80d835f65768df1041a79683f6ca Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 15 May 2012 14:50:11 +0200 Subject: rlimit: RLIMIT_RTTIME is in usec, not nsec We are taking the liberty not to bump the bus API. This should be unproblematic since it's only an auxiliary function, and not exported in any binary API (but is in a drop-in file). --- rtkit-test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rtkit-test.c') diff --git a/rtkit-test.c b/rtkit-test.c index a6b79df..01f7684 100644 --- a/rtkit-test.c +++ b/rtkit-test.c @@ -77,7 +77,7 @@ int main(int argc, char *argv[]) { DBusError error; DBusConnection *bus; int r, max_realtime_priority, min_nice_level; - long long rttime_nsec_max; + long long rttime_usec_max; struct rlimit rlim; dbus_error_init(&error); @@ -97,10 +97,10 @@ int main(int argc, char *argv[]) { else printf("Min nice level is: %d\n", min_nice_level); - if ((rttime_nsec_max = rtkit_get_rttime_nsec_max(bus)) < 0) - fprintf(stderr, "Failed to retrieve rttime limit: %s\n", strerror(-rttime_nsec_max)); + if ((rttime_usec_max = rtkit_get_rttime_usec_max(bus)) < 0) + fprintf(stderr, "Failed to retrieve rttime limit: %s\n", strerror(-rttime_usec_max)); else - printf("Rttime limit is: %lld ns\n", rttime_nsec_max); + printf("Rttime limit is: %lld ns\n", rttime_usec_max); memset(&rlim, 0, sizeof(rlim)); rlim.rlim_cur = rlim.rlim_max = 100000000ULL; /* 100ms */ -- cgit