waywardgeek / infnoise

The world's easiest TRNG to get right
Creative Commons Zero v1.0 Universal
732 stars 100 forks source link

Introduce struct for parsed options #35

Closed runema closed 6 years ago

runema commented 6 years ago

This contains two commits. The first adds a structure opt_struct for parsed options. A pointer to the structure replaces some arguments to function calls. This makes the calls simpler, but the overall code size does not shrink.

The second commit reduces the CPU-usage by increasing the poll timeout if the --daemon option is used. This change means that infnoise does not show up in top(1) on my system.