lkml.org 
[lkml]   [1997]   [Feb]   [14]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
From(Harald Koenig)
SubjectRe: Jiffies
DateFri, 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                     ^^^^^       ^^^^^
\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.213 / U:0.020 seconds]
©2003-2008 Jasper Spaans