mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
clutter/private: Make all time unit conversions int64_t
This way there is less risk of ending up with would-be negative unsigned values. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1494
This commit is contained in:
parent
433b59f74a
commit
53c4ebee82
@ -268,32 +268,32 @@ gboolean _clutter_run_progress_function (GType gtype,
|
|||||||
|
|
||||||
void clutter_timeline_cancel_delay (ClutterTimeline *timeline);
|
void clutter_timeline_cancel_delay (ClutterTimeline *timeline);
|
||||||
|
|
||||||
static inline uint64_t
|
static inline int64_t
|
||||||
us (uint64_t us)
|
us (int64_t us)
|
||||||
{
|
{
|
||||||
return us;
|
return us;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32_t
|
static inline int64_t
|
||||||
ms (uint32_t ms)
|
ms (int64_t ms)
|
||||||
{
|
{
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint64_t
|
static inline int64_t
|
||||||
ms2us (uint64_t ms)
|
ms2us (int64_t ms)
|
||||||
{
|
{
|
||||||
return us (ms * 1000);
|
return us (ms * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32_t
|
static inline int64_t
|
||||||
us2ms (uint64_t us)
|
us2ms (int64_t us)
|
||||||
{
|
{
|
||||||
return (uint32_t) (us / 1000);
|
return (int64_t) (us / 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint64_t
|
static inline int64_t
|
||||||
ns2us (uint64_t ns)
|
ns2us (int64_t ns)
|
||||||
{
|
{
|
||||||
return us (ns / 1000);
|
return us (ns / 1000);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user