// G_OBJECT(drawing->drawing_area), "control_flow_data");
LttTime start, time_end;
- LttTime window_end = ltt_time_add(time_window.time_width,
- time_window.start_time);
+ LttTime window_end = time_window.end_time;
g_debug("req : window start_time : %u, %u", time_window.start_time.tv_sec,
time_window.start_time.tv_nsec);
LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss);
TimeWindow time_window =
lttvwindow_get_time_window(cfd->tab);
- LttTime end_time = ltt_time_add(time_window.start_time,
- time_window.time_width);
+ LttTime end_time = time_window.end_time;
+
guint width = cfd->drawing->width;
guint x=0;
g_debug("request expose");
- LttTime window_end = ltt_time_add(time_window.time_width,
- time_window.start_time);
+ LttTime window_end = time_window.end_time;
+
#if 0
convert_time_to_pixels(
time_window.start_time,
guint cursor_x=0;
- LttTime window_end = ltt_time_add(time_window.time_width,
- time_window.start_time);
-
+ LttTime window_end = time_window.end_time;
/* update the screen from the pixmap buffer */
gdk_draw_pixmap(widget->window,
{
LttTime time;
- LttTime window_end = ltt_time_add(time_window.time_width,
- time_window.start_time);
+ LttTime window_end = time_window.end_time;
/* left mouse button click */
GdkColor foreground = { 0, 0, 0, 0 };
GdkColor background = { 0, 0xffff, 0xffff, 0xffff };
- LttTime window_end =
- ltt_time_add(time_window.time_width,
- time_window.start_time);
+ LttTime window_end = time_window.end_time;
LttTime half_width =
ltt_time_div(time_window.time_width,2.0);
LttTime window_middle =
TimeWindow time_window =
lttvwindow_get_time_window(control_flow_data->tab);
- LttTime end_time = ltt_time_add(time_window.start_time,
- time_window.time_width);
+ LttTime end_time = time_window.end_time;
if(ltt_time_compare(evtime, time_window.start_time) == -1
|| ltt_time_compare(evtime, end_time) == 1)
TimeWindow time_window =
lttvwindow_get_time_window(tab);
- LttTime end_time = ltt_time_add(time_window.start_time,
- time_window.time_width);
+ LttTime end_time = time_window.end_time;
+
//if(time < time_beg || time > time_end) return;
if(ltt_time_compare(evtime, time_window.start_time) == -1
|| ltt_time_compare(evtime, end_time) == 1)
TimeWindow time_window =
lttvwindow_get_time_window(control_flow_data->tab);
- LttTime end_time = ltt_time_add(time_window.start_time,
- time_window.time_width);
+ LttTime end_time = time_window.end_time;
if(ltt_time_compare(evtime, time_window.start_time) == -1
|| ltt_time_compare(evtime, end_time) == 1)
TimeWindow time_window =
lttvwindow_get_time_window(control_flow_data->tab);
- LttTime end_time = ltt_time_add(time_window.start_time,
- time_window.time_width);
+ LttTime end_time = time_window.end_time;
+
//if(time < time_beg || time > time_end) return;
if(ltt_time_compare(evtime, time_window.start_time) == -1
|| ltt_time_compare(evtime, end_time) == 1)
TimeWindow time_window =
lttvwindow_get_time_window(control_flow_data->tab);
- LttTime end_time = ltt_time_add(time_window.start_time,
- time_window.time_width);
+ LttTime end_time = time_window.end_time;
if(ltt_time_compare(evtime, time_window.start_time) == -1
|| ltt_time_compare(evtime, end_time) == 1)
TimeWindow time_window =
lttvwindow_get_time_window(control_flow_data->tab);
- LttTime end_time = ltt_time_add(time_window.start_time,
- time_window.time_width);
+ LttTime end_time = time_window.end_time;
if(ltt_time_compare(evtime, time_window.start_time) == -1
|| ltt_time_compare(evtime, end_time) == 1)
TimeWindow time_window =
lttvwindow_get_time_window(control_flow_data->tab);
- LttTime end_time = ltt_time_add(time_window.start_time,
- time_window.time_width);
+ LttTime end_time = time_window.end_time;
if(ltt_time_compare(evtime, time_window.start_time) == -1
|| ltt_time_compare(evtime, end_time) == 1)
TimeWindow time_window =
lttvwindow_get_time_window(control_flow_data->tab);
- LttTime end_time = ltt_time_add(time_window.start_time,
- time_window.time_width);
+ LttTime end_time = time_window.end_time;
if(ltt_time_compare(evtime, time_window.start_time) == -1
|| ltt_time_compare(evtime, end_time) == 1)
g_info("scrolling");
LttTime *ns = &new_time_window->start_time;
LttTime *os = &old_time_window->start_time;
- LttTime old_end = ltt_time_add(old_time_window->start_time,
- old_time_window->time_width);
- LttTime new_end = ltt_time_add(new_time_window->start_time,
- new_time_window->time_width);
+ LttTime old_end = old_time_window->end_time;
+ LttTime new_end = new_time_window->end_time;
//if(ns<os+w<ns+w)
//if(ns<os+w && os+w<ns+w)
//if(ns<old_end && os<ns)
new_time_window.start_time = time_begin;
new_time_window.time_width = width;
+ new_time_window.end_time = ltt_time_add(time_begin, width);
lttvwindow_report_time_window(control_flow_data->tab, new_time_window);
}
new_time_window.start_time = time_begin;
new_time_window.time_width = width;
+ new_time_window.end_time = ltt_time_add(time_begin, width);
lttvwindow_report_time_window(control_flow_data->tab, new_time_window);
TimeWindow time_window =
lttvwindow_get_time_window(control_flow_data->tab);
- LttTime end_time = ltt_time_add(time_window.start_time,
- time_window.time_width);
+ LttTime end_time = time_window.end_time;
if(ltt_time_compare(evtime, time_window.start_time) == -1
|| ltt_time_compare(evtime, end_time) == 1)
/* Set the tab's time window and current time if
* out of bounds */
if(ltt_time_compare(tab->time_window.start_time, time_span.start_time) < 0
- || ltt_time_compare( ltt_time_add(tab->time_window.start_time,
- tab->time_window.time_width),
+ || ltt_time_compare(tab->time_window.end_time,
time_span.end_time) > 0) {
new_time_window.start_time = time_span.start_time;
tmp_time.tv_sec = time_span.end_time.tv_sec;
tmp_time.tv_nsec = 0;
new_time_window.time_width = tmp_time ;
+ new_time_window.end_time = ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width) ;
}
time_change_manager(tab, new_time_window);
current_time_change_manager(tab, new_current_time);
if(size == 0){
new_time_window.start_time = time_span.start_time;
new_time_window.time_width = time_delta;
+ new_time_window.end_time = ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width) ;
}else{
new_time_window.time_width = ltt_time_div(new_time_window.time_width, size);
if(ltt_time_compare(new_time_window.time_width,time_delta) > 0)
{ /* Case where zoom out is bigger than trace length */
new_time_window.start_time = time_span.start_time;
new_time_window.time_width = time_delta;
+ new_time_window.end_time = ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width) ;
}
else
{
/* Center the image on the current time */
new_time_window.start_time =
ltt_time_sub(current_time, ltt_time_div(new_time_window.time_width, 2.0));
+ new_time_window.end_time = ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width) ;
/* If on borders, don't fall off */
if(ltt_time_compare(new_time_window.start_time, time_span.start_time) <0)
{
new_time_window.start_time = time_span.start_time;
+ new_time_window.end_time = ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width) ;
}
else
{
- if(ltt_time_compare(
- ltt_time_add(new_time_window.start_time, new_time_window.time_width),
- time_span.end_time) > 0)
+ if(ltt_time_compare(new_time_window.end_time,
+ time_span.end_time) > 0)
{
new_time_window.start_time =
ltt_time_sub(time_span.end_time, new_time_window.time_width);
+
+ new_time_window.end_time = ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width) ;
}
}
LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
TimeInterval time_span = tsc->time_span;
LttTime start_time = new_time_window.start_time;
- LttTime end_time = ltt_time_add(new_time_window.start_time,
- new_time_window.time_width);
+ LttTime end_time = new_time_window.end_time;
/* Set scrollbar */
GtkAdjustment *adjustment = gtk_range_get_adjustment(GTK_RANGE(tab->scrollbar));
TimeWindow new_time_window = tab->time_window;
- LttTime end_time = ltt_time_add(new_time_window.start_time,
- new_time_window.time_width);
+ LttTime end_time = new_time_window.end_time;
new_time_window.start_time.tv_sec = value;
new_time_window.start_time.tv_nsec = time_span.end_time.tv_nsec-1;
}
- /* check if end time selected is below or equal */
if(ltt_time_compare(new_time_window.start_time, end_time) >= 0) {
/* Then, we must push back end time : keep the same time width
* if possible, else end traceset time */
- end_time = LTT_TIME_MIN(time_span.end_time,
- ltt_time_add(new_time_window.start_time,
- new_time_window.time_width)
- );
+ end_time = LTT_TIME_MIN(ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width),
+ time_span.end_time);
}
/* Fix the time width to fit start time and end time */
new_time_window.time_width = ltt_time_sub(end_time,
new_time_window.start_time);
+ new_time_window.end_time = end_time;
time_change_manager(tab, new_time_window);
TimeWindow new_time_window = tab->time_window;
- LttTime end_time = ltt_time_add(new_time_window.start_time,
- new_time_window.time_width);
+ LttTime end_time = new_time_window.end_time;
new_time_window.start_time.tv_nsec = value;
- /* check if end time selected is below or equal */
if(ltt_time_compare(new_time_window.start_time, end_time) >= 0) {
/* Then, we must push back end time : keep the same time width
* if possible, else end traceset time */
- end_time = LTT_TIME_MIN(time_span.end_time,
- ltt_time_add(new_time_window.start_time,
- new_time_window.time_width)
- );
+ end_time = LTT_TIME_MIN(ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width),
+ time_span.end_time);
}
/* Fix the time width to fit start time and end time */
new_time_window.time_width = ltt_time_sub(end_time,
new_time_window.start_time);
+ new_time_window.end_time = end_time;
+
time_change_manager(tab, new_time_window);
}
TimeWindow new_time_window = tab->time_window;
- LttTime end_time = ltt_time_add(new_time_window.start_time,
- new_time_window.time_width);
+ LttTime end_time = new_time_window.end_time;
+
end_time.tv_sec = value;
/* end nanoseconds */
end_time.tv_nsec = time_span.end_time.tv_nsec;
}
- /* check if end time selected is below or equal */
if(ltt_time_compare(new_time_window.start_time, end_time) >= 0) {
/* Then, we must push front start time : keep the same time width
* if possible, else end traceset time */
- new_time_window.start_time = LTT_TIME_MAX(time_span.start_time,
- ltt_time_sub(end_time,
- new_time_window.time_width)
- );
+ new_time_window.start_time = LTT_TIME_MAX(
+ ltt_time_sub(end_time,
+ new_time_window.time_width),
+ time_span.start_time);
}
/* Fix the time width to fit start time and end time */
new_time_window.time_width = ltt_time_sub(end_time,
new_time_window.start_time);
+ new_time_window.end_time = end_time;
+
time_change_manager(tab, new_time_window);
}
TimeWindow new_time_window = tab->time_window;
- LttTime end_time = ltt_time_add(new_time_window.start_time,
- new_time_window.time_width);
+ LttTime end_time = new_time_window.end_time;
+
end_time.tv_nsec = value;
- /* check if end time selected is below or equal */
if(ltt_time_compare(new_time_window.start_time, end_time) >= 0) {
/* Then, we must push front start time : keep the same time width
* if possible, else end traceset time */
- new_time_window.start_time = LTT_TIME_MAX(time_span.start_time,
- ltt_time_sub(end_time,
- new_time_window.time_width)
- );
+ new_time_window.start_time = LTT_TIME_MAX(
+ ltt_time_sub(end_time,
+ new_time_window.time_width),
+ time_span.start_time);
}
/* Fix the time width to fit start time and end time */
new_time_window.time_width = ltt_time_sub(end_time,
new_time_window.start_time);
+ new_time_window.end_time = end_time;
time_change_manager(tab, new_time_window);
new_time_window.time_width =
ltt_time_from_double(page_size);
+ new_time_window.end_time = ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width);
+
time_change_manager(tab, new_time_window);
#if 0