aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/common.h
diff options
context:
space:
mode:
authorGravatar Kurtis Rader <krader@skepticism.us>2016-06-24 19:25:48 -0700
committerGravatar Kurtis Rader <krader@skepticism.us>2016-06-24 19:32:46 -0700
commitb2a2705df4b17480a0983db9a1748bded0324007 (patch)
treec3571a381610673e8c9921dfb5cdc21ca828f484 /src/common.h
parent0d6bdb38e62ec434cf9ee861e66428370c96bd5a (diff)
croak if gettimeofday() fails
There is no conceivable way in which timef()'s invocation of gettimeofday() can fail where it makes sense to continue running. Yes, one such, legitimate, failure mode is a 32-bit kernel and the date is greater than 2038-01-19 03:14:07. If you're running a fish binary on such a system it's time to upgrade. Otherwise, either the hardware or OS is broken. Fixes #3167.
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common.h b/src/common.h
index 85b2dcc6..3c2416f6 100644
--- a/src/common.h
+++ b/src/common.h
@@ -744,8 +744,7 @@ int create_directory(const wcstring &d);
void bugreport();
/// Return the number of seconds from the UNIX epoch, with subsecond precision. This function uses
-/// the gettimeofday function, and will have the same precision as that function. If an error
-/// occurs, NAN is returned.
+/// the gettimeofday function and will have the same precision as that function.
double timef();
/// Call the following function early in main to set the main thread. This is our replacement for