Displaying 1 result from an estimated 1 matches for "stop_time_secs".
2004 Apr 22
2
[PATCH] --timelimit and --stopat
...me = start_time + (timelimit * 60);
+
+ return ( tv.tv_sec > expiration_time ) ? 1 : 0;
+}
+
+/**
+ When --stopat is used, compare current stopat time and the current calendar time,
+ and return 1 when the stopat time has been reached.
+ **/
+static int has_stopat_expired()
+{
+ static time_t stop_time_secs = 0;
+ time_t now = 0;
+ struct tm stopat_time;
+ char *valid_time = NULL;
+
+ assert(stopat != NULL);
+
+ if( 0 == stop_time_secs ) {
+ valid_time = strptime(stopat, "%y%m%d%H%M%S", &stopat_time);
+ if( NULL == valid_time ) {
+ rprintf(FERROR, "ERROR: invalid --stopat format...