在Pentamicro上使用usleep所得到的真實時間:
[0]:(sleep.c::main) runtime=7921(10-6 s)
[1]:(sleep.c::main) runtime=9223(10-6 s)
[2]:(sleep.c::main) runtime=9915(10-6 s)
[3]:(sleep.c::main) runtime=9786(10-6 s)
[4]:(sleep.c::main) runtime=10147(10-6 s)
[5]:(sleep.c::main) runtime=9522(10-6 s)
[6]:(sleep.c::main) runtime=9673(10-6 s)
[7]:(sleep.c::main) runtime=9846(10-6 s)
[8]:(sleep.c::main) runtime=9831(10-6 s)
[9]:(sleep.c::main) runtime=9733(10-6 s)
[10]:(sleep.c::main) runtime=19919(10-6 s)
[11]:(sleep.c::main) runtime=20233(10-6 s)
[12]:(sleep.c::main) runtime=19682(10-6 s)
[13]:(sleep.c::main) runtime=19759(10-6 s)
[14]:(sleep.c::main) runtime=19931(10-6 s)
[15]:(sleep.c::main) runtime=20125(10-6 s)
[16]:(sleep.c::main) runtime=19772(10-6 s)
[17]:(sleep.c::main) runtime=19901(10-6 s)
[18]:(sleep.c::main) runtime=19956(10-6 s)
[19]:(sleep.c::main) runtime=19931(10-6 s)
[20]:(sleep.c::main) runtime=30250(10-6 s)
[21]:(sleep.c::main) runtime=29850(10-6 s)
[22]:(sleep.c::main) runtime=30170(10-6 s)
[23]:(sleep.c::main) runtime=29601(10-6 s)
[24]:(sleep.c::main) runtime=30010(10-6 s)
[25]:(sleep.c::main) runtime=30107(10-6 s)
[26]:(sleep.c::main) runtime=30181(10-6 s)
[27]:(sleep.c::main) runtime=29524(10-6 s)
[28]:(sleep.c::main) runtime=30048(10-6 s)
[29]:(sleep.c::main) runtime=30055(10-6 s)
=>以每10ms為一單位,若在此單位中,無論其值為何,皆sleep近乎同一值。
沒有留言:
張貼留言