ES2 MUD LIB :: 東方故事二(ES2) 天朝帝國 mudlib 瀏覽展示
/doc/efuns/rusage
rrrruuuussssaaaaggggeeee((((3333)))) MMMMuuuuddddOOOOSSSS ((((5555 SSSSeeeepppp 1111999999994444)))) rrrruuuussssaaaaggggeeee((((3333))))
NNNNAAAAMMMMEEEE
rusage() - reports information gathered by the getrusage()
system call
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
mapping rusage( void );
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
This efun collects information gathered via the getrusage()
system call. Read the getrusage() man page for more
information on what information will be collected. Some
systems do not have the getrusage() system call but do have
the times() system call. On those systems, only "utime" and
"stime" will be available. Times are reported in
milliseconds.
Here is an example usage of rusage():
void
create()
{
mapping info;
info = rusage();
write("user time = " + info["utime"] + "ms\n");
write("system time = " + info["stime"] + "ms\n");
}
The available fields are:
utime, stime, maxrss, ixrss, idrss, isrss, minflt,
majflt, nswap, inblock, oublock, msgsnd, msgrcv,
nsignals, nvcsw, nivcsw.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
time_expression(3), function_profile(3), time(3), uptime(3)
Page 1 (printed 3/16/95)