The cpu time is the `user' time i.e. the CPU time used while executing instructions in the user space of the calling process.
Note that the granularity of the system clock is usually 1/60 or 1/50 of a second. Hence if you use cputime/1 to measure runtimes make sure that the measured intervals are long enough.
The time given by the ps command gives the sum of `user' time and `system' time, which is the CPU time used by the system on behalf of the calling process.
Success: [eclipse]: cputime(T). T = 0.0333333 yes. Fail: cputime(0.000001). Error: cputime(2). (Error 5).