mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-09 03:30:48 +02:00
Bash-5.3-alpha release
This commit is contained in:
+11
-2
@@ -1,6 +1,6 @@
|
||||
/* posixtime.h -- wrapper for time.h, sys/times.h mess. */
|
||||
|
||||
/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1999-2022 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -49,9 +49,18 @@ struct timeval
|
||||
#endif
|
||||
|
||||
#if !HAVE_GETTIMEOFDAY
|
||||
extern int gettimeofday PARAMS((struct timeval *, void *));
|
||||
extern int gettimeofday (struct timeval * restrict, void * restrict);
|
||||
#endif
|
||||
|
||||
/* consistently use gettimeofday for time information */
|
||||
static inline time_t
|
||||
getnow(void)
|
||||
{
|
||||
struct timeval now;
|
||||
gettimeofday (&now, 0);
|
||||
return now.tv_sec;
|
||||
}
|
||||
|
||||
/* These exist on BSD systems, at least. */
|
||||
#if !defined (timerclear)
|
||||
# define timerclear(tvp) do { (tvp)->tv_sec = 0; (tvp)->tv_usec = 0; } while (0)
|
||||
|
||||
Reference in New Issue
Block a user