use an overflow check instead of a hard coded value for ETA

This commit is contained in:
philsmd
2017-08-16 17:51:35 +02:00
parent 58012ada0c
commit 1644ac30b5
6 changed files with 93 additions and 77 deletions
+4
View File
@@ -62,4 +62,8 @@ void hc_string_trim_leading (char *s);
size_t hc_fread (void *ptr, size_t size, size_t nmemb, FILE *stream);
void hc_fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream);
void hc_time (hc_time_t *t);
struct tm *hc_gmtime (hc_time_t *t);
char *hc_ctime (hc_time_t *t, char *buf, MAYBE_UNUSED size_t buf_size);
#endif // _SHARED_H
+1
View File
@@ -47,6 +47,7 @@ double status_get_msec_paused (const hashcat_ctx_t *hashcat_
double status_get_msec_real (const hashcat_ctx_t *hashcat_ctx);
char *status_get_time_started_absolute (const hashcat_ctx_t *hashcat_ctx);
char *status_get_time_started_relative (const hashcat_ctx_t *hashcat_ctx);
hc_time_t status_get_sec_etc (const hashcat_ctx_t *hashcat_ctx);
char *status_get_time_estimated_absolute (const hashcat_ctx_t *hashcat_ctx);
char *status_get_time_estimated_relative (const hashcat_ctx_t *hashcat_ctx);
u64 status_get_restore_point (const hashcat_ctx_t *hashcat_ctx);
+8
View File
@@ -43,6 +43,14 @@ typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
// time
#if defined (_WIN)
typedef __time64_t hc_time_t;
#else
typedef time_t hc_time_t;
#endif
// timer
#if defined (_WIN)