Re: Jiffies

Harald Koenig (koenig@tat.physik.uni-tuebingen.de)
Fri, 14 Feb 1997 09:44:25 +0100 (MET)


> Can someone tell me what a jiffie is and how to convert
> it to seconds? I'm trying to convert the starttime entry
> from /proc/[pid]/stat and display it as a (date and) time
> of day. I'm desperate, so direct email would be appreciated.

jiffies are clock ticks (1/100 sec for ix86, 1/1024sec for ALPHA) starting
with zero for "starttime". to convert use

time_t now = starttime + jiffies / HZ;
char *timestring = ctime (&now);

or use gmtime() or localtime() etc...

Harald

--
All SCSI disks will from now on                     ___       _____
be required to send an email notice                0--,|    /OOOOOOO\
24 hours prior to complete hardware failure!      <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig,                                         \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik                              //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^