X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=time.c;h=1fd7b0981584fc4557079ee62a87fbd713554f3a;hp=155e11d86e99dcbdef2535108c5602fa1752efc5;hb=d27b31524e1d60ad4fdbeb606bba31ba0ee54048;hpb=88648fbe815c12e36e48f7d244b274c45366cad1;ds=sidebyside diff --git a/time.c b/time.c index 155e11d8..1fd7b098 100644 --- a/time.c +++ b/time.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2007 Andre Noll + * Copyright (C) 2005-2008 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -169,3 +169,13 @@ int tv_convex_combination(const long a, const struct timeval *tv1, ret = -ret; return ret; } + +void compute_chunk_time(long unsigned chunk_num, + struct timeval *chunk_tv, struct timeval *stream_start, + struct timeval *result) +{ + struct timeval tmp; + + tv_scale(chunk_num, chunk_tv, &tmp); + tv_add(&tmp, stream_start, result); +}