changeset 4936:bc83063dc5ef draft

common: Remove now unused timespec macros
author Roy Marples <roy@marples.name>
date Sat, 04 Jan 2020 07:28:35 +0000
parents 978c1d5b04e8
children 62871607444f
files src/common.h
diffstat 1 files changed, 0 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/src/common.h	Sat Jan 04 07:26:04 2020 +0000
+++ b/src/common.h	Sat Jan 04 07:28:35 2020 +0000
@@ -65,31 +65,6 @@
 #define timespecisset(tsp)      ((tsp)->tv_sec || (tsp)->tv_nsec)
 #endif
 
-#define timespec_to_double(tv)						     \
-	((double)(tv)->tv_sec + (double)((tv)->tv_nsec) / 1000000000.0)
-#define timespecnorm(tv) do {						     \
-	while ((tv)->tv_nsec >=  NSEC_PER_SEC) {			     \
-		(tv)->tv_sec++;						     \
-		(tv)->tv_nsec -= NSEC_PER_SEC;				     \
-	}								     \
-} while (0 /* CONSTCOND */);
-#define ts_to_ms(ms, tv) do {						     \
-	ms = (tv)->tv_sec * MSEC_PER_SEC;				     \
-	ms += (tv)->tv_nsec / NSEC_PER_MSEC;				     \
-} while (0 /* CONSTCOND */);
-#define ms_to_ts(tv, ms) do {						     \
-	(tv)->tv_sec = ms / MSEC_PER_SEC;				     \
-	(tv)->tv_nsec = (suseconds_t)(ms - ((tv)->tv_sec * MSEC_PER_SEC))    \
-	    * NSEC_PER_MSEC;						     \
-} while (0 /* CONSTCOND */);
-
-#ifndef TIMEVAL_TO_TIMESPEC
-#define	TIMEVAL_TO_TIMESPEC(tv, ts) do {				\
-	(ts)->tv_sec = (tv)->tv_sec;					\
-	(ts)->tv_nsec = (tv)->tv_usec * USEC_PER_NSEC;			\
-} while (0 /* CONSTCOND */)
-#endif
-
 #if __GNUC__ > 2 || defined(__INTEL_COMPILER)
 # ifndef __packed
 #  define __packed __attribute__((__packed__))