Move away from GTimeVal
GLib 2.28 will deprecate GTimeVal and related API in favour of standardizing on microseconds granularity for all time-based API. Clutter should switch too. All of the current users of GTimeVal convert to milliseconds when doing time operations, and use GTimeVal only as storage. This can effectively be replaced by a gint64. The Master Clock uses a microsecond resolution, except when interacting with the main loop itself, since the main loop has a millisecond resolution - at least until Ryan Lortie manages to switch that too to microseconds on Linux. The clutter_timeline_do_tick() function was erroneously not privatized, but it was still assumed to be private; we should just remove it from the public symbols.
This commit is contained in:
@ -144,11 +144,13 @@ clutter_frame_source_prepare (GSource *source,
|
||||
gint *delay)
|
||||
{
|
||||
ClutterFrameSource *frame_source = (ClutterFrameSource *) source;
|
||||
GTimeVal current_time;
|
||||
GTimeVal source_time;
|
||||
gint64 current_time;
|
||||
|
||||
g_source_get_current_time (source, ¤t_time);
|
||||
g_source_get_current_time (source, &source_time);
|
||||
current_time = source_time.tv_sec * 1000 + source_time.tv_usec / 1000;
|
||||
|
||||
return _clutter_timeout_interval_prepare (¤t_time,
|
||||
return _clutter_timeout_interval_prepare (current_time,
|
||||
&frame_source->timeout,
|
||||
delay);
|
||||
}
|
||||
|
Reference in New Issue
Block a user