[so] Times
Octavian Purdila
so@cursuri.cs.pub.ro
Sat, 20 Nov 2004 20:49:17 +0200
On Saturday 20 November 2004 20:47, Octavian Purdila wrote:
> On Saturday 20 November 2004 20:34, Octavian Purdila wrote:
> > On Saturday 20 November 2004 20:22, dalex alex wrote:
> > > --- Octavian Purdila <tavi@cs.pub.ro> wrote:
> > > > Nu. IOTime se calculeaza ca diferente timpului
> > > > absolut, si nu a CPUTime-ului
> > > > (folosesti ce intoarce times si nu tms->tms_stime)
> > >
> > > Din man pt times:
> > >
> > > The function times returns the number of clock ticks
> > > that have elapsed since an arbitrary point in the
> > > past. For Linux this point
> > > is the moment the system was booted. This
> > > return value may overflow the possible range of type
> > > clock_t.
> > >
> > > Din cate stiu eu, cam la 70 si ceva de minute, times()
> > > o ia de la inceput. Asta ar putea sa fie o problema in
> > > calcularea timpilor daca pornim procesele aproape de
> > > acest moment.
> >
> > Corect :) Din fericire exista gettimeofday.
>
> PS: cu times() exista probleme daca diferenta dintre timpul initial si cel
> final este mai mare de 70 de secunde.
Era vorba de minute si nu secunde.
tavi