summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-file-operations.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcaja-private/caja-file-operations.c')
-rw-r--r--libcaja-private/caja-file-operations.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libcaja-private/caja-file-operations.c b/libcaja-private/caja-file-operations.c
index e310de1f..534b3b9f 100644
--- a/libcaja-private/caja-file-operations.c
+++ b/libcaja-private/caja-file-operations.c
@@ -176,8 +176,7 @@ typedef struct {
} TransferInfo;
#define SECONDS_NEEDED_FOR_RELIABLE_TRANSFER_RATE 15
-#define NSEC_PER_SEC 1000000000
-#define NSEC_PER_MSEC 1000000
+#define NSEC_PER_MICROSEC 1000
#define MAXIMUM_DISPLAYED_FILE_NAME_LENGTH 50
@@ -1405,12 +1404,12 @@ report_delete_progress (CommonJob *job,
int files_left;
double elapsed, transfer_rate;
int remaining_time;
- guint64 now;
+ gint64 now;
char *files_left_s;
- now = g_get_monotonic_time () * 1000;
+ now = g_get_monotonic_time ();
if (transfer_info->last_report_time != 0 &&
- ABS ((gint64)(transfer_info->last_report_time - now)) < 100 * NSEC_PER_MSEC) {
+ ABS ((gint64)(transfer_info->last_report_time - now)) < 100 * NSEC_PER_MICROSEC) {
return;
}
transfer_info->last_report_time = now;
@@ -2878,10 +2877,10 @@ report_copy_progress (CopyMoveJob *copy_job,
is_move = copy_job->is_move;
- now = g_get_monotonic_time () * 1000;
+ now = g_get_monotonic_time ();
if (transfer_info->last_report_time != 0 &&
- ABS ((gint64)(transfer_info->last_report_time - now)) < 100 * NSEC_PER_MSEC) {
+ ABS ((gint64)(transfer_info->last_report_time - now)) < 100 * NSEC_PER_MICROSEC) {
return;
}
transfer_info->last_report_time = now;