1. When talking about the time a process has used up, there seems to be a term called jiffies for example. "stime: The number of jiffies that this process has been sheduled in kernel mode". What is a jiffie??
2. How do I obtain the correct format from these jiffies, i've tried using strftime but this seems to give the incorrect format claiming that the process has been running for over an hour rather than less than a millisecond in some cases.
3. How do i get a consistent format when using printf, for example say I had three parameters for each process, the process id, the terminal being used and the name of the process. Each time these are printed a new line is inserted and the same happens for the next process found. Problem being is say the user id in one case was 3 digits long and in the second case it was only 1 digit long, this would in turn effect where the tty was being printed i.e. the process with one digit, the name of the tty would be printed further to the left than that of the one with a 3 digit process id. I've tried using tab characters in the printf but this causes the same problem. How do I maintain a consistent format for all of the processes.