~ubuntu-branches/ubuntu/vivid/gcl/vivid

« back to all changes in this revision

Viewing changes to dos/dostimes.c

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2002-03-04 14:29:59 UTC
  • Revision ID: james.westby@ubuntu.com-20020304142959-dey14w08kr7lldu3
Tags: upstream-2.5.0.cvs20020219
ImportĀ upstreamĀ versionĀ 2.5.0.cvs20020219

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <sys/times.h>
 
2
#include <sys/resource.h>
 
3
 
 
4
#ifdef __ZTC__
 
5
#define HZ 100
 
6
#endif
 
7
 
 
8
times(x)
 
9
struct tms *x;
 
10
{ int hz;
 
11
struct rusage ru;
 
12
getrusage(RUSAGE_SELF,&ru);
 
13
hz =  ru.ru_utime.tv_sec * HZ +
 
14
       (ru.ru_utime.tv_usec *HZ)/1000000;
 
15
x->tms_utime = hz;
 
16
x->tms_stime = hz;
 
17
return 0;
 
18
}
 
19