Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

These commands work fine: (calculates time between opening and closing the program)

time gedit
time emacs
time vim 

But this command always gives a time under 1 second. It's probably time which opening the program took.

time gvim
share|improve this question
up vote 1 down vote accepted

The GUI version of vim will detach from the foreground terminal by default - you can tell it not to - and so has "exited" from the point of view of the time command.

Detaching means it doesn't block the terminal which, for a GUI application, is a pretty reasonable choice.

Your analysis - that this is roughly the startup time - is on the money.

share|improve this answer
What else can I do to evaluate the time for gvim, else than tell it not to detach – a-z Mar 10 '12 at 18:20
There isn't a convenient way to get time(1) to do that other than keep gvim in the foreground, which might be what you want anyhow. You could monitor the process table and track the life of the forked gvim that way, you could use strace and follow forks, and get time that way, or you could do something with cgroups to follow it. Just asking it to stay in the foreground instead is probably the right choice though - time gvim -f ... – Daniel Pittman Mar 10 '12 at 18:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .