/****************************************************************************
- * Copyright 2020 Thomas E. Dickey *
+ * Copyright 2020,2023 Thomas E. Dickey *
* Copyright 2008-2010,2014 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#include <windows.h>
-MODULE_ID("$Id: gettimeofday.c,v 1.4 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: gettimeofday.c,v 1.7 2023/02/25 20:05:36 tom Exp $")
+#if HAVE_GETTIMEOFDAY == 2
#define JAN1970 116444736000000000LL /* the value for 01/01/1970 00:00 */
-int
+NCURSES_EXPORT(int)
gettimeofday(struct timeval *tv, void *tz GCC_UNUSED)
{
union {
tv->tv_sec = (long) ((data.since1601 - JAN1970) / 10000000LL);
return (0);
}
+#endif // HAVE_GETTIMEOFDAY == 2