plasma-umass / browsix

Browsix is a Unix-like operating system for the browser.
Other
3.16k stars 182 forks source link

cmd: time #10

Open bpowers opened 8 years ago

bpowers commented 8 years ago

We should implement time as a command. This is sometimes implemented as a shell builtin in addition, but lets begin with a standalone program.

One thing to think about is how time should get and display information on how long it took a child to run. The simplest thing would be to record the time at which we issued the spawn syscall to the time we received SIGCHLD. It might be better tho to extend the kernel to keep track of this info, and implement a standard syscall like getrusage to access that info from time.