CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - call record
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Sub Category
ARM-PowerPC-ColdFire-MIPS
Embeded Linux
SCM
VxWorks
uCOS
DSP program
Windows CE
VHDL-FPGA-Verilog
Other Embeded program
QNX
hardware design
Open-source hardware
Search - call record - List
[
Embeded Linux
]
clock
DL : 0
实验二 同步与异步write的效率比较设置输入缓冲区时需要知道输入文件的长度。除了使用系统调用stat外,更简单的方法是利用lseek的返回值来获取文件的长度。在按每一个给定大小的输出缓冲区计算写文件时间时,应当在开始写之前调用times(),记录下开始时间,然后在整个输入缓冲区都复制到输出文件之后,再调用times(),两次调用times()的时间间隔,就是在这个给定大小的输出缓冲区的限制下,复制整个输入文件所耗费的写时间。-Experiment two synchronous and asynchronous write efficiency set input buffer need to know the length of the input file. In addition to using the system call stat, the easier way is to use the return value of lseek to get the length of the file. Per one calculation to write the file time to set the size of the output buffer, it should be called before you start writing times (), record the start time, then the entire input buffer are copied to the output file, and then call times () call times (twice) time interval, is the limitations of a given size of the output buffer, write the time-consuming to copy the entire input file....
Date
: 2026-01-11
Size
: 37kb
User
:
林素素
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.