diff options
author | Po Lu <luangruo@yahoo.com> | 2023-03-24 10:46:14 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2023-03-24 10:46:14 +0800 |
commit | d7457e1ce4eed211915a6666cc2e7f61516ed343 (patch) | |
tree | 5eddaefaebf25dabcc357108198a2660a0dd8b3a /lib-src | |
parent | b78ef9bcd1bf34bec877b4fd30f2bbb97cb0919c (diff) | |
parent | 4566a0c6b825a18e6c065da0543b8b942b7db8df (diff) |
Merge remote-tracking branch 'origin/master' into feature/android
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/movemail.c | 3 | ||||
-rw-r--r-- | lib-src/update-game-score.c | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 8119046a916..a71be8c2099 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -62,6 +62,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ #include <stdlib.h> #include <errno.h> #include <time.h> +#include <timespec.h> #include <getopt.h> #include <unistd.h> @@ -846,7 +847,7 @@ movemail_strftime (char *s, size_t size, char const *format, static bool mbx_delimit_begin (FILE *mbf) { - time_t now = time (NULL); + time_t now = current_timespec ().tv_sec; struct tm *ltime = localtime (&now); if (!ltime) return false; diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index 83167f59b8a..4592e14d1d6 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c @@ -185,8 +185,6 @@ main (int argc, char **argv) ptrdiff_t scorecount, scorealloc; ptrdiff_t max_scores = MAX_SCORES; - srand (time (0)); - while ((c = getopt (argc, argv, "hrm:d:")) != -1) switch (c) { @@ -485,8 +483,8 @@ lock_file (const char *filename, void **state) return -1; attempts = 0; } - - sleep ((rand () & 1) + 1); + else + sleep (1); } close (fd); |