.
D 2010-10-29T23:36:39
J icomment Attaching\sthe\sfinal\spatch.\sCare\sis\staken\sto\snever\sundershoot,\susing\sa\sceiling()\sapproach\swhen\srounding\susecs\sdo\smsecs\sin\stime\sdifferences.\sNow\sa\sloop\sof\s{after\s1}\sconsumes\s<\s0.1%\sCPU\sinstead\sof\s50%.\sAlso,\sthe\stotal\ssyscall\sbudget\sis\smuch\sreduced:\sone\sselect()\sand\sthree\sgettimeofday()\sonly\sfor\sa\ssmall\s[after].\n\nCost\sin\saccuracy:\n\n%\stime\s{after\s1}\s1000\n1060.089\smicroseconds\sper\siteration\n%\stime\s{after\s2}\s1000\n2061.111\smicroseconds\sper\siteration\n%\stime\s{after\s3}\s1000\n3062.367\smicroseconds\sper\siteration\n%\stime\s{after\s100}\s10\n100235.0\smicroseconds\sper\siteration\n%\stime\s{after\s10000}\s1\n10002067\smicroseconds\sper\siteration\n\n
J login ferrieux
J mimetype text/plain
J username ferrieux
K 2905784fffffffffffffffffffffffffffffffff
U ferrieux
Z 5902e7d9d64c7cb6f3f07a0fd6b88e16