mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: add dm_timestamp_copy()
This commit is contained in:
parent
c2d814e78d
commit
99f55abc56
@ -72,6 +72,7 @@ dm_task_get_ioctl_timestamp
|
||||
dm_task_set_record_timestamp
|
||||
dm_timestamp_alloc
|
||||
dm_timestamp_compare
|
||||
dm_timestamp_copy
|
||||
dm_timestamp_delta
|
||||
dm_timestamp_destroy
|
||||
dm_timestamp_get
|
||||
|
@ -2182,6 +2182,11 @@ struct dm_timestamp *dm_timestamp_alloc(void);
|
||||
*/
|
||||
int dm_timestamp_get(struct dm_timestamp *ts);
|
||||
|
||||
/*
|
||||
* Copy a timestamp from ts_old to ts_new.
|
||||
*/
|
||||
void dm_timestamp_copy(struct dm_timestamp *ts_new, struct dm_timestamp *ts_old);
|
||||
|
||||
/*
|
||||
* Compare two timestamps.
|
||||
*
|
||||
|
@ -168,6 +168,11 @@ uint64_t dm_timestamp_delta(struct dm_timestamp *ts1, struct dm_timestamp *ts2)
|
||||
return t2 - t1;
|
||||
}
|
||||
|
||||
void dm_timestamp_copy(struct dm_timestamp *ts_new, struct dm_timestamp *ts_old)
|
||||
{
|
||||
*ts_new = *ts_old;
|
||||
}
|
||||
|
||||
void dm_timestamp_destroy(struct dm_timestamp *ts)
|
||||
{
|
||||
dm_free(ts);
|
||||
|
Loading…
Reference in New Issue
Block a user