Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have found the general Linux program time, which times a command. For example, suppose I want to time the execution of foo. I can use:

time foo

which gives this sample output:

real    0m8.738s
user    0m5.796s
sys     0m0.576s

However, the man page for time seems a bit unclear (although I am a Linux novice):

TIME(1)                       Linux User's Manual                      TIME(1)



NAME
       time - time a simple command or give resource usage

SYNOPSIS
       time [options] command [arguments...]

DESCRIPTION
       The  time  command  runs  the  specified program command with the given
       arguments.  When command finishes, time writes a  message  to  standard
       error  giving  timing statistics about this program run.  These statis-
       tics consist of (i) the elapsed real time between invocation and termi-
       nation, (ii) the user CPU time (the sum of the tms_utime and tms_cutime
       values in a struct tms as returned by times(2)), and (iii)  the  system
       CPU  time  (the  sum of the tms_stime and tms_cstime values in a struct
       tms as returned by times(2)).

Does the "real" time refer to the wall clock time?

share|improve this question

1 Answer 1

up vote 8 down vote accepted

"Real" time is elapsed time, which is usually the difference between wall clock times, but not always.

For example, if you start a process at 01:59:00 on the day in which daylight-savings (summer) time takes effect in a locale in which the time change is at 02:00, and the process takes two minutes, then the real elapsed time will be two minutes, while the wall clock will show a difference of one hour and two minutes. (When the time offset changes back, the wall clock difference will be negative, but the real elapsed time will continue to be the same.)

share|improve this answer
2  
So to extend the metaphor, the "real" time is "stop watch" time. –  depquid Jun 17 '13 at 17:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.