diff options
author | Laslo Hunhold <dev@frign.de> | 2017-08-13 23:21:23 +0200 |
---|---|---|
committer | Aaron Marcher <me@drkhsh.at> | 2017-08-13 23:45:16 +0200 |
commit | 796b661284ea296833424f7f55aff2da3ba08d81 (patch) | |
tree | d997efcc7339e16ce123d1852c4cfebe34c36588 /Makefile | |
parent | 3468a6e368974ea222ab81c389e0800748541c42 (diff) |
Refactor main()
We remove the hack with the sleep and global "delay"-variable and use a
monotonic clock to derive the desired monotonic properties of the tool.
Inside each function that demands a personal delay we can then just do a
nanosleep() and be done with it.
It's a shame that timespec is so ugly to work with, but there's really
no way to make it more beautiful. However, at this cost though we
finally can set the interval times in milliseconds and not only just
seconds.
We remove setlocale(), because nothing good ever came out of this
function.
Besides that we have some more code refactoring, especially in the
argument loop which saves us a bit of complexity.
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions