Talk:Accelerometers

I performed simple timing measurements for using the repeated fopen compated to using rewind on the sysfs file (as sysfs files must be seeked to start or reopened to get new information) and they are as follows:

1000 reads of values, parsing with scanf and writing to a file using repeated opening and closing of said file.

real 0m 1.74s user 0m 0.09s sys 0m 0.57s


1000 reads, parsing and writing by using rewind.

real 0m 1.19s user 0m 0.02s sys 0m 0.10s


This indicates that processor usage on applications with high fps and accelerometer usage could be lowered by using rewind instead of repeated fopen. Should this method of accessing the file be mentioned on the article?

sharpneli 15:45, 18 January 2010 (UTC)