- Category:
- Console
- Tags:
-
[C/C++]
[源码]
- File Size:
- 3kb
- Update:
- 2014-04-17
- Downloads:
- 0 Times
- Uploaded by:
- 吴我
Description: The second experiment, process control (15 points) to design and implement the Unix " time" command. " Mytime" command from the command line arguments accepted to run the program, create a separate process to run the program, and record the program running time. In the Windows implementation: use CreateProcess () to create a process using WaitForSingleObject () between " mytime" command and the newly created process synchronous call GetSystemTime () to get the time in the Linux implementation: use fork ()/execv () to create a process to run the program using the wait () to wait for the end of the newly created process call gettimeofday () to get the time mytime usage: $ mytime.exe program1 Please note that the readability of the results, such as: YYMMDDHHMMSS milliseconds microseconds
To Search:
File list (Check if you may need any files):
实验二代码
..........\linux
..........\.....\2.c
..........\.....\Readme.txt
..........\.....\hello.c
..........\windows
..........\.......\1Readme.txt
..........\.......\father.c
..........\.......\son.c