From Edwin Groothuis via bug 6179:

Add nstime_copy.

svn path=/trunk/; revision=38509
This commit is contained in:
Stig Bjørlykke 2011-08-13 17:39:25 +00:00
parent 64a6efe5d6
commit 154b9b9ee9
3 changed files with 17 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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