change default offset
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 31 Aug 2005 19:16:04 +0000 (19:16 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 31 Aug 2005 19:16:04 +0000 (19:16 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1099 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/lttv/batchtest.c
ltt/branches/poly/lttv/lttv/tracecontext.h

index 9c6adf9af56509d0a02c1c3808a4b9d38aabe7f1..bb19955e860de884a0b42f20d6aa234314c432f9 100644 (file)
@@ -710,6 +710,18 @@ static gboolean process_traceset(void __UNUSED__ *hook_data,
       g_warning("Problem with seek_n ! Positions differ. (4)");
     }
     
+    lttv_traceset_context_position_save(tsc, saved_pos);
+    t0 = get_time();
+    lttv_process_traceset_seek_n_backward(tsc, 10,
+        seek_back_default_offset, lttv_process_traceset_seek_time, NULL);
+    t1 = get_time();
+    g_message("Seek backward 10 events in %g seconds", t1 - t0);
+    t0 = get_time();
+    count = lttv_process_traceset_seek_n_forward(tsc, 10, NULL);
+    t1 = get_time();
+    g_message("Seek forward 10 events in %g seconds", t1 - t0);
+
+   
     /* try a volountary error */
     lttv_process_traceset_seek_time(tsc, ltt_time_infinite);
 
@@ -729,7 +741,8 @@ static gboolean process_traceset(void __UNUSED__ *hook_data,
     count = lttv_process_traceset_seek_n_forward(tsc, 200000, NULL);
     lttv_traceset_context_position_save(tsc, saved_pos);
     lttv_process_traceset_seek_n_backward(tsc, 100301,
-        seek_back_default_offset, lttv_state_traceset_seek_time_closest, NULL);
+        seek_back_default_offset,
+        (seek_time_fct)lttv_state_traceset_seek_time_closest, NULL);
     count = lttv_process_traceset_seek_n_forward(tsc, 100301, NULL);
     
     if(lttv_traceset_context_ctx_pos_compare(tsc, saved_pos)) {
index c200ff5156c18b21f75d57e922bbb5311470c9b5..37c4ba17884b6b615b1df3a4a0369b950a8d59d2 100644 (file)
@@ -348,7 +348,7 @@ void lttv_process_traceset_get_sync_data(LttvTracesetContext *tsc);
 #define BACKWARD_SEEK_MUL 2 /* Multiplication factor of time_offset between
                                backward seek iterations */
 
-static const LttTime seek_back_default_offset = { 0, 100000000 };
+static const LttTime seek_back_default_offset = { 1, 0 };
 
 guint lttv_process_traceset_seek_n_forward(LttvTracesetContext *self,
                                            guint n,
This page took 0.024428 seconds and 4 git commands to generate.