diff options
author | mzuther <mzuther@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2010-02-06 23:51:27 +0000 |
---|---|---|
committer | mzuther <mzuther@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2010-02-06 23:51:27 +0000 |
commit | 7a8ba6a1135800510b93621b78e6d0d3f53e0c2c (patch) | |
tree | e7f57a63f70e66e41f27bd3f8c43fe6c567d8f6c | |
parent | fd89168c6b1e62541f8aa683c6d03a1d19eba7e5 (diff) | |
download | lcd4linux-7a8ba6a1135800510b93621b78e6d0d3f53e0c2c.tar.gz |
timer.c: I had forgotten how to initialize a "struct" :)
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1104 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
-rw-r--r-- | timer.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -77,9 +77,10 @@ int nTimers = 0; static void timer_inc(struct timeval *tv, const int msec) { - struct timeval diff; - diff.tv_sec = msec / 1000; - diff.tv_usec = (msec % 1000) * 1000; + struct timeval diff = { + .tv_sec = msec / 1000, + .tv_usec = (msec % 1000) * 1000 + }; timeradd(tv, &diff, tv); } |