search for: has_set_rsync_start_tim

Displaying 2 results from an estimated 2 matches for "has_set_rsync_start_tim".

2004 Apr 19
3
[PATCH] time limit
...13:06:03.000000000 -0400 +++ rsync-2.6.1pre-2_modified/util.c 2004-04-19 16:07:57.000000000 -0400 @@ -1050,6 +1050,22 @@ return True; } +/** + * Return the time that rsync is started, used by --time-limit + **/ +time_t get_rsync_start_time(void) +{ + static struct timeval tval; + static int has_set_rsync_start_time = 0; + + if( ! has_set_rsync_start_time ) { + gettimeofday(&tval, NULL); + has_set_rsync_start_time = 1; + } + + return tval.tv_sec; +} /** * Determine if two file modification times are equivalent (either
2004 Apr 22
2
[PATCH] --timelimit and --stopat
...13:06:03.000000000 -0400 +++ rsync-2.6.1pre-2_modified/util.c 2004-04-22 15:29:57.000000000 -0400 @@ -1050,6 +1050,22 @@ return True; } +/** + * Return the time that rsync is started, used by --time-limit + **/ +time_t get_rsync_start_time(void) +{ + static struct timeval tval; + static int has_set_rsync_start_time = 0; + + if( ! has_set_rsync_start_time ) { + gettimeofday(&tval, NULL); + has_set_rsync_start_time = 1; + } + + return tval.tv_sec; +} + /** * Determine if two file modification times are equivalent (either