From: Xavier V. <xav...@fr...> - 2004-01-18 16:33:19
|
Hello to the list ! I'm thinking about using or not the new hash uility for my i2c_sensors plugin. But this plugins is bit different for the others (xmms, cpuinfo, ...). In fact, each value is stored in a separate file, that's the claim. - If I use and hash to store all values it'll force to parse about a dozen of files for one or two used values ! I don't think it's the better way :/ - On the other hand, using timers would be great ! Should I use a dozen of different timeouts ? A solution would be to - Have an hash for the dozen of values, which may contain "null" values of never asked for. - Have a second hash containing the timers for each value. - So the function looks at the 1st array, if there's no value it pools, if there's a value, it looks for the associated timer and does what it has to do. The problem with this desing may be that the overload generated by the hashes and all the timers may be more CPU intersive that parsing one file o demand. What's your opinion about this ? Michael, is it possible to use the hash to store timer values ? Is there another way, using only one timer ? Bye ! -- Xavier VELLO <xav...@fr...> |