From 512e92d5e1834cf76026cdfdec76d6f629d830c2 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 11 Feb 2012 20:28:35 +0100 Subject: [PATCH] Timer: get_timer() adds a random offset to catch misuse of timestamp_t --- ucw/timer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ucw/timer.c b/ucw/timer.c index 41f51f94..31688dbe 100644 --- a/ucw/timer.c +++ b/ucw/timer.c @@ -18,7 +18,11 @@ get_timestamp(void) { struct timeval tv; gettimeofday(&tv, NULL); - return (timestamp_t)tv.tv_sec * 1000 + tv.tv_usec / 1000; + return (timestamp_t)tv.tv_sec * 1000 + tv.tv_usec / 1000 +#ifdef CONFIG_UCW_DEBUG + + 3141592653 // So that we catch all attempts to corelate timestamp_t with wall clock +#endif + ; } void -- 2.39.5