diff options
Diffstat (limited to 'sysdeps/mach/hurd/times.c')
-rw-r--r-- | sysdeps/mach/hurd/times.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sysdeps/mach/hurd/times.c b/sysdeps/mach/hurd/times.c index 3aac803c51..56a0062cd5 100644 --- a/sysdeps/mach/hurd/times.c +++ b/sysdeps/mach/hurd/times.c @@ -42,7 +42,7 @@ __times (struct tms *tms) struct task_basic_info bi; struct task_thread_times_info tti; mach_msg_type_number_t count; - union { time_value_t tvt; struct timeval tv; } now; + time_value_t now; error_t err; count = TASK_BASIC_INFO_COUNT; @@ -65,10 +65,9 @@ __times (struct tms *tms) /* XXX This can't be implemented until getrusage(RUSAGE_CHILDREN) can be. */ tms->tms_cutime = tms->tms_cstime = 0; - if (__gettimeofday (&now.tv, NULL) < 0) - return -1; + __host_get_time (__mach_host_self (), &now); - return (clock_from_time_value (&now.tvt) + return (clock_from_time_value (&now) - clock_from_time_value (&bi.creation_time)); } weak_alias (__times, times) |