OK, that makes sense, I was just hopping something could be possible to do because the hwclock command is comming with the openwrt releases.
Anyway, I guess I'll have to rethink about my project. Let me share it with you:
Basically I have a distance sensor (HC-SR04) to measure the water level of a tank. This sensor is on the top of the tank and has one input (trigger) and an output (echo).
In order to know the water level, I measure the distance from the sensor to the water. And how can it measure the distance with this device? We have to put the trigger pin at "1" and the sensor will send an ultrasound "ping" that will be reflected in the object (in this case, the water). When the reflection ("pong") reaches the sensor, the echo pin turns "1".
Measuring the time between "ping" and "pong", with some math and knowing the speed of sound (~340m/s) we can get an approximate distance.
Since the fonera router is not really reliable to measure time (multi tasking OS), I was thinking in somehow using the RTC to measure it, but since its not supported in OpenWRT, I have to come with other alternative.
An additional detail is that the sensor pins are connected to a PCF8574 (I2C port extender) and this may have impact on the measurement time. However, I'm not able to quantify it in order to know if it should be considered in the calculations.
So, any suggestion on how to make this work?