From Edwin Groothuis via bug 6179:
Add nstime_copy. svn path=/trunk/; revision=38509
This commit is contained in:
parent
64a6efe5d6
commit
154b9b9ee9
|
@ -660,6 +660,7 @@ next_tvb_add_uint
|
|||
next_tvb_add_string
|
||||
next_tvb_call
|
||||
nstime_cmp
|
||||
nstime_copy
|
||||
nstime_delta
|
||||
nstime_diff
|
||||
nstime_is_unset
|
||||
|
|
|
@ -71,6 +71,16 @@ gboolean nstime_is_unset(nstime_t *nstime)
|
|||
}
|
||||
|
||||
|
||||
/** funcion: nstime_copy
|
||||
*
|
||||
* a = b
|
||||
*/
|
||||
void nstime_copy(nstime_t *a, const nstime_t *b)
|
||||
{
|
||||
a->secs = b->secs;
|
||||
a->nsecs = b->nsecs;
|
||||
}
|
||||
|
||||
/*
|
||||
* function: nstime_delta
|
||||
* delta = b - a
|
||||
|
|
|
@ -56,6 +56,12 @@ extern void nstime_set_unset(nstime_t *nstime);
|
|||
/* is the given nstime_t currently (0,maxint)? */
|
||||
extern gboolean nstime_is_unset(nstime_t *nstime);
|
||||
|
||||
/** duplicate the current time
|
||||
*
|
||||
* a = b
|
||||
*/
|
||||
extern void nstime_copy(nstime_t *a, const nstime_t *b);
|
||||
|
||||
/** calculate the delta between two times (can be negative!)
|
||||
*
|
||||
* delta = b-a
|
||||
|
|
Loading…
Reference in New Issue