Likely, if clock_gettime() is implemented on a system, the first
valid clock will be set to '0'. If not all clock are defined,
by setting our fake definitions to '0', we may accidental use a
valid clock when we did not mean to. Setting the clocks to '-1'
in hopes to avoid this.
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@819
64e312b2-a51f-0410-8e61-
82d0ca0eb02a
* be available. These should define which type of clock
* clock_gettime() should use. We define it here if it is
* not defined simply so the reimplementation can ignore it.
+ *
+ * We set the values of these clocks to some (hopefully)
+ * invalid value, to avoid the case where we define a
+ * clock with a valid value, and unintentionally use
+ * an actual good clock by accident.
*/
#ifndef CLOCK_MONOTONIC
-#define CLOCK_MONOTONIC 0
+#define CLOCK_MONOTONIC -1
#endif
#ifndef CLOCK_REALTIME
-#define CLOCK_REALTIME 0
+#define CLOCK_REALTIME -1
#endif
#ifndef HAVE_LIBRT